trytond-product_variant / product.xml

The default branch has multiple heads

<?xml version="1.0"?>
    <!--
        This file is part of Tryton. The COPYRIGHT file at the top level of
        this repository contains the full copyright notices and license terms.
    -->
<tryton>
    <data>
        <!-- product.product -->
        <record model="ir.ui.view" id="product_view_form">
            <field name="model">product.product</field>
            <field name="inherit" ref="product.product_view_form"/>
            <field name="arch" type="xml">
                <![CDATA[
                <data>
                 <xpath
                        expr="/form/label[@name='basecode']"
                        position="replace"/>
                    <xpath
                        expr="/form/field[@name='basecode']"
                        position="replace">
                        <label name="template"/>
                        <field name="template"/>
                        <label name="variants"/>
                        <field name="variants"/>
                    </xpath>
                   <xpath expr="/form/notebook/page[@id='general']/field[@name='description']"
                        position="after">
                        <field name="attribute_values" colspan="4"/>
                    </xpath>
                    <xpath expr="/form/notebook/page[@id='products']"
                        position="replace"/>      
                </data>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="product_view_tree">
            <field name="model">product.product</field>
            <field name="inherit" ref="product.product_view_tree"/>
            <field name="arch" type="xml">
                <![CDATA[
                <data>
                    <xpath
                        expr="/tree/field[@name=&quot;variants&quot;]"
                        position="replace"/>
                    
                </data>
                ]]>
            </field>
        </record>

        <!-- product.template -->
        <record model="ir.ui.view" id="template_view_form">
            <field name="model">product.template</field>
            <field name="inherit" ref="product.template_view_form"/>
            <field name="arch" type="xml">
                <![CDATA[
                <data>
                    <xpath expr="/form/field[@name=&quot;active&quot;]"
                        position="after">
                        <label name="basecode"/>
                        <field name="basecode"/>
                    </xpath>                    
                    <xpath expr="/form/notebook/page[@id=&quot;general&quot;]"
                        position="after">
                        <page string="Variants" col="4" id="products">
                            <field name="products" colspan="4"/>
                            <field name="attributes" colspan="4"/>
                            <button name="generate_variants" 
                                string="Generate Variants"
                                type="object" icon="tryton-ok"/>
                        </page>
                    </xpath>
                </data>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="template_view_tree">
            <field name="model">product.template</field>
            <field name="inherit" ref="product.template_view_tree"/>
            <field name="arch" type="xml">
                <![CDATA[
                <data>
                    <xpath
                        expr="/tree/field[@name=&quot;name&quot;]"
                        position="after">
                        <field name="variants"/>   
                    </xpath>
                </data>
                ]]>
            </field>
        </record>

        <record model="ir.action.act_window" id="act_template_form">
            <field name="name">Product Template</field>
            <field name="res_model">product.template</field>
        </record>
        <record model="ir.action.act_window.view" id="act_template_list_view">
            <field name="sequence" eval="100"/>
            <field name="view" ref="product.template_view_tree"/>
            <field name="act_window" ref="act_template_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_template_form_view">
            <field name="sequence" eval="110"/>
            <field name="view" ref="product.template_view_form"/>
            <field name="act_window" ref="act_template_form"/>
        </record>
        <menuitem name="Templates" parent="product.menu_main_product"
            sequence="0" id="menu_product_templates" action="act_template_form"/>
        
        <record model="ir.action.act_window" id="act_relate_form">
            <field name="name">Product Variants</field>
            <field name="res_model">product.product</field>
            <field name="domain">[('template', '=', Eval('active_id'))]</field>
        </record>
        
        <record model="ir.action.keyword" id="act_open_products">
            <field name="keyword">form_relate</field>
            <field name="model">product.template,-1</field>
            <field name="action" ref="act_relate_form" />
        </record>

        <!-- product.attribute -->
        <record model="ir.ui.view" id="product_attribute_view_form">
            <field name="model">product.attribute</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Product Attributes">
                <label name="name"/>
                <field name="name"/>
                <label name="sequence"/>
                <field name="sequence"/>
                <newline/>
                <field name="values" colspan="4"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="product_attribute_view_tree">
            <field name="model">product.attribute</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Product Attributes" sequence="sequence">
                <field name="sequence" tree_invisible="1"/>
                <field name="name"/>
                <field name="values"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.action.act_window" id="act_product_attribute_form">
            <field name="name">Product Attributes</field>
            <field name="res_model">product.attribute</field>
        </record>
        <record model="ir.action.act_window.view" id="act_product_attribute_list_view">
            <field name="sequence" eval="100"/>
            <field name="view" ref="product_attribute_view_tree"/>
            <field name="act_window" ref="act_product_attribute_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_product_attribute_form_view">
            <field name="sequence" eval="110"/>
            <field name="view" ref="product_attribute_view_form"/>
            <field name="act_window" ref="act_product_attribute_form"/>
        </record>
        
        <menuitem name="Product Attributes" id="menu_product_attribute"
            parent="menu_product_configuration" sequence="10"
            action="act_product_attribute_form"/>        
        <record model="ir.ui.menu-res.group"
            id="menu_product_attribute_group">
            <field name="menu" ref="menu_product_attribute"/>
            <field name="group" ref="product.group_product_admin"/>
        </record>

        <!-- product.attribute.value -->
        <record model="ir.ui.view" id="product_attribute_value_view_form">
            <field name="model">product.attribute.value</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Product Attribute Values">
                <label name="name"/>
                <field name="name"/>
                <label name="code"/>
                <field name="code"/>
                </form>
                ]]>
            </field>
        </record>
        
        <record model="ir.ui.view" id="product_attribute_value_view_tree">
            <field name="model">product.attribute.value</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Product Attribute Values" sequence="sequence">
                <field name="sequence" tree_invisible="1"/>
                <field name="name"/>
                <field name="code"/>
                <field name="attribute"/>
                </tree>
                ]]>
            </field>
        </record>
    </data>
</tryton>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.