Source

trytond-product_variant / product.xml

Full commit
grasbauer c3dea9c 
Raimon Esteve (Z… a527f12 

grasbauer c3dea9c 
grasbauer 9573298 
Raimon Esteve (Z… b9fe16e 
grasbauer 9573298 



grasbauer c3dea9c 

Raimon Esteve (Z… dbe935b 







grasbauer 1660912 

grasbauer c3dea9c 
grasbauer 1660912 
Raimon Esteve (Z… dbe935b 

grasbauer 1660912 
grasbauer c3dea9c 

grasbauer 9573298 

grasbauer ab7dc82 
grasbauer 9573298 






grasbauer e76e99a 
grasbauer 9573298 




grasbauer c3dea9c 
Raimon Esteve (Z… b9fe16e 
grasbauer 9573298 









Raimon Esteve (Z… 7de4153 
grasbauer 9573298 

Raimon Esteve (Z… dbe935b 
grasbauer 9573298 



Raimon Esteve (Z… dbe935b 
grasbauer 9573298 





grasbauer c3dea9c 
grasbauer 9573298 



grasbauer c3dea9c 




grasbauer e76e99a 
grasbauer c3dea9c 


grasbauer 9573298 

grasbauer c3dea9c 
grasbauer 9573298 





Raimon Esteve (Z… b9fe16e 
grasbauer 9573298 



Raimon Esteve (Z… b9fe16e 
grasbauer 9573298 


grasbauer e76e99a 
Raimon Esteve (Z… 5226694 




Raimon Esteve (Z… b9fe16e 










grasbauer 9573298 

Raimon Esteve (Z… b9fe16e 
grasbauer 9573298 



grasbauer c3dea9c 









grasbauer 9573298 

grasbauer c3dea9c 
grasbauer 9573298 



grasbauer c3dea9c 
grasbauer 9573298 
grasbauer bb7fc5f 
grasbauer c3dea9c 



grasbauer 9573298 

Raimon Esteve (Z… b9fe16e 














grasbauer 1660912 
grasbauer ab7dc82 

Raimon Esteve (Z… b9fe16e 
grasbauer 1660912 




grasbauer ab7dc82 
Raimon Esteve (Z… b9fe16e 
grasbauer ab7dc82 























grasbauer e76e99a 
grasbauer ab7dc82 



grasbauer 9573298 
grasbauer c3dea9c 
<?xml version="1.0"?>
<!-- This file is part product_variant module for 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/notebook" position="inside">
                        <page string="Variants" id="variants" states="{'invisible': Not(Bool(Eval('variants')))}">
                            <label name="variants"/>
                            <field name="variants"/>
                            <field name="attribute_values" colspan="4"/>
                        </page>
                    </xpath>
                    <xpath
                        expr="/form/label[@name='basecode']"
                        position="replace"/>
                    <xpath
                        expr="/form/field[@name='basecode']"
                        position="replace"/>
                    <xpath expr="/form/notebook/page[@id='variants']"
                        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="variants">
                            <field name="attributes" colspan="4"/>
                            <button name="generate_variants" 
                                string="Generate Variants"
                                type="object" icon="tryton-ok"/>
                            <field name="products" colspan="4"/>
                        </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.ui.menu-res.group"
            id="menu_product_template_group">
            <field name="menu" ref="menu_product_templates"/>
            <field name="group" ref="product.group_product_admin"/>
        </record>
        
        <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>