|  | @@ -0,0 +1,228 @@
 | 
	
		
			
				|  |  | +<?xml version="1.0" encoding="utf-8"?>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<openerp>
 | 
	
		
			
				|  |  | +    <data>
 | 
	
		
			
				|  |  | +        <record id="product_curve_search_form_view" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product.curve.search.form</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.curve</field>
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <search string="Product Curve">
 | 
	
		
			
				|  |  | +                    <field name="name"/>
 | 
	
		
			
				|  |  | +                    <!-- <field name="partner_id"/> -->
 | 
	
		
			
				|  |  | +                </search>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <act_window
 | 
	
		
			
				|  |  | +            id="action_open_curve_products"
 | 
	
		
			
				|  |  | +            name="Curve Products"
 | 
	
		
			
				|  |  | +            res_model="product.template"
 | 
	
		
			
				|  |  | +            view_type="form"
 | 
	
		
			
				|  |  | +            view_mode="kanban,form,tree"
 | 
	
		
			
				|  |  | +            domain="[('product_curve_id', '=', active_id)]"/>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <act_window
 | 
	
		
			
				|  |  | +            id="action_open_single_product_curve"
 | 
	
		
			
				|  |  | +            name="Product Curve"
 | 
	
		
			
				|  |  | +            res_model="product.curve"
 | 
	
		
			
				|  |  | +            view_type="form"
 | 
	
		
			
				|  |  | +            view_mode="kanban,form,tree"
 | 
	
		
			
				|  |  | +            target="current"
 | 
	
		
			
				|  |  | +            domain="[('product_ids', 'in', active_id)]"/>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_curve_form" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product.curve.form</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.curve</field>
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <form string="Product Curve" version="7.0">
 | 
	
		
			
				|  |  | +                    <sheet>
 | 
	
		
			
				|  |  | +                        <field name="logo" widget="image" class="oe_avatar oe_left"/>
 | 
	
		
			
				|  |  | +                        <div class="oe_title">
 | 
	
		
			
				|  |  | +                            <div class="oe_edit_only">
 | 
	
		
			
				|  |  | +                                <label for="name" string="Curve Name"/>
 | 
	
		
			
				|  |  | +                            </div>
 | 
	
		
			
				|  |  | +                            <h1>
 | 
	
		
			
				|  |  | +                                <field name="name"/>
 | 
	
		
			
				|  |  | +                            </h1>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                        <div class="oe_right oe_button_box">
 | 
	
		
			
				|  |  | +                            <button
 | 
	
		
			
				|  |  | +                                class="oe_inline oe_stat_button"
 | 
	
		
			
				|  |  | +                                type="action"
 | 
	
		
			
				|  |  | +                                name="%(action_open_curve_products)d"
 | 
	
		
			
				|  |  | +                                icon="fa-cubes">
 | 
	
		
			
				|  |  | +                                <field name="products_count" string="Products" widget="statinfo" />
 | 
	
		
			
				|  |  | +                            </button>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                        <!-- <group>
 | 
	
		
			
				|  |  | +                            <field name="partner_id"/>
 | 
	
		
			
				|  |  | +                        </group> -->
 | 
	
		
			
				|  |  | +                        <group string="Description">
 | 
	
		
			
				|  |  | +                            <field name="description" nolabel="1"/>
 | 
	
		
			
				|  |  | +                        </group>
 | 
	
		
			
				|  |  | +                    </sheet>
 | 
	
		
			
				|  |  | +                </form>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_curve_tree" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product.curve.tree</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.curve</field>
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <tree string="product.curve">
 | 
	
		
			
				|  |  | +                    <field name="name"/>
 | 
	
		
			
				|  |  | +                    <field name="description"/>
 | 
	
		
			
				|  |  | +                    <!-- <field name="partner_id"/> -->
 | 
	
		
			
				|  |  | +                </tree>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_curve_kanban" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product.curve.kanban</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.curve</field>
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <kanban>
 | 
	
		
			
				|  |  | +                    <field name="logo"/>
 | 
	
		
			
				|  |  | +                    <field name="products_count"/>
 | 
	
		
			
				|  |  | +                    <field name="description"/>
 | 
	
		
			
				|  |  | +                    <templates>
 | 
	
		
			
				|  |  | +                        <t t-name="kanban-box">
 | 
	
		
			
				|  |  | +                            <div class="oe_kanban_vignette oe_semantic_html_override">
 | 
	
		
			
				|  |  | +                                <a type="open">
 | 
	
		
			
				|  |  | +                                    <img t-att-src="kanban_image('product.product', 'logo', record.id.value)"
 | 
	
		
			
				|  |  | +                                         class="oe_kanban_image"/>
 | 
	
		
			
				|  |  | +                                </a>
 | 
	
		
			
				|  |  | +                                <div class="oe_kanban_details">
 | 
	
		
			
				|  |  | +                                    <h4>
 | 
	
		
			
				|  |  | +                                        <a type="open">
 | 
	
		
			
				|  |  | +                                            <field name="name"/>
 | 
	
		
			
				|  |  | +                                        </a>
 | 
	
		
			
				|  |  | +                                    </h4>
 | 
	
		
			
				|  |  | +                                    <div>
 | 
	
		
			
				|  |  | +                                        <a name="%(product_curve.action_open_curve_products)d"
 | 
	
		
			
				|  |  | +                                           type="action">
 | 
	
		
			
				|  |  | +                                            <t t-esc="record.products_count.value"/> Products
 | 
	
		
			
				|  |  | +                                        </a>
 | 
	
		
			
				|  |  | +                                    </div>
 | 
	
		
			
				|  |  | +                                    <span>
 | 
	
		
			
				|  |  | +                                        <t t-esc="record.description.value.substr(0,200)"/>
 | 
	
		
			
				|  |  | +                                        <t t-if="record.description.value.length > 200">
 | 
	
		
			
				|  |  | +                                            <a type="open"><b>...</b></a>
 | 
	
		
			
				|  |  | +                                        </t>
 | 
	
		
			
				|  |  | +                                    </span>
 | 
	
		
			
				|  |  | +                                </div>
 | 
	
		
			
				|  |  | +                            </div>
 | 
	
		
			
				|  |  | +                        </t>
 | 
	
		
			
				|  |  | +                    </templates>
 | 
	
		
			
				|  |  | +                </kanban>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="product_search_form_view" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product.search.form</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.product</field>
 | 
	
		
			
				|  |  | +            <field name="inherit_id" ref="product.product_search_form_view"/>
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <field name="categ_id" position="after">
 | 
	
		
			
				|  |  | +                    <field name="product_curve_id"/>
 | 
	
		
			
				|  |  | +                </field>
 | 
	
		
			
				|  |  | +                <group string='Group by...' position="inside">
 | 
	
		
			
				|  |  | +                    <filter string="Curve" name="groupby_curve" domain="[]"
 | 
	
		
			
				|  |  | +                            context="{'group_by' : 'product_curve_id'}"/>
 | 
	
		
			
				|  |  | +                </group>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_template_search_curve" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product.template.search.curve</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.template</field>
 | 
	
		
			
				|  |  | +            <field name="inherit_id" ref="product.product_template_search_view"/>
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <field name="name" position="after">
 | 
	
		
			
				|  |  | +                    <field name="product_curve_id"/>
 | 
	
		
			
				|  |  | +                </field>
 | 
	
		
			
				|  |  | +                <group string='Group by...' position="inside">
 | 
	
		
			
				|  |  | +                    <filter string="Curva" name="groupby_curve" domain="[]"
 | 
	
		
			
				|  |  | +                            context="{'group_by' : 'product_curve_id'}"/>
 | 
	
		
			
				|  |  | +                </group>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="product_template_form_curve_add" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product.template.product.form</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.template</field>
 | 
	
		
			
				|  |  | +            <field name="inherit_id" ref="product.product_template_form_view" />
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <field name="name" position="after"  >
 | 
	
		
			
				|  |  | +                    <field name="product_curve_id" placeholder="Curve"/>
 | 
	
		
			
				|  |  | +                </field>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_template_kanban_curve" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product kanban view: add curve</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.template</field>
 | 
	
		
			
				|  |  | +            <field name="inherit_id" ref="product.product_template_kanban_view" />
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <xpath expr="//h4" position="after">
 | 
	
		
			
				|  |  | +                    <div>
 | 
	
		
			
				|  |  | +                        <a t-if="record.product_curve_id" type="action"
 | 
	
		
			
				|  |  | +                           name="%(action_open_single_product_curve)d">
 | 
	
		
			
				|  |  | +                            <field name="product_curve_id"/>
 | 
	
		
			
				|  |  | +                        </a>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </xpath>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_variant_kanban_curve" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product variant kanban view: add curve</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.product</field>
 | 
	
		
			
				|  |  | +            <field name="inherit_id" ref="product.product_kanban_view" />
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <xpath expr="//h4" position="after">
 | 
	
		
			
				|  |  | +                    <div>
 | 
	
		
			
				|  |  | +                        <a t-if="record.product_curve_id" type="open">
 | 
	
		
			
				|  |  | +                            <field name="product_curve_id"/>
 | 
	
		
			
				|  |  | +                        </a>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </xpath>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_template_tree_curve" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product tree view: add curve</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.template</field>
 | 
	
		
			
				|  |  | +            <field name="inherit_id" ref="product.product_template_tree_view" />
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <field name="name" position="after">
 | 
	
		
			
				|  |  | +                    <field name="product_curve_id"/>
 | 
	
		
			
				|  |  | +                </field>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record id="view_product_variant_tree_curve" model="ir.ui.view">
 | 
	
		
			
				|  |  | +            <field name="name">product variant tree view: add curve</field>
 | 
	
		
			
				|  |  | +            <field name="model">product.product</field>
 | 
	
		
			
				|  |  | +            <field name="inherit_id" ref="product.product_product_tree_view" />
 | 
	
		
			
				|  |  | +            <field name="arch" type="xml">
 | 
	
		
			
				|  |  | +                <field name="name" position="after">
 | 
	
		
			
				|  |  | +                    <field name="product_curve_id"/>
 | 
	
		
			
				|  |  | +                </field>
 | 
	
		
			
				|  |  | +            </field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <record model="ir.actions.act_window" id="action_product_curve">
 | 
	
		
			
				|  |  | +            <field name="name">Curva</field>
 | 
	
		
			
				|  |  | +            <field name="res_model">product.curve</field>
 | 
	
		
			
				|  |  | +            <field name="view_type">form</field>
 | 
	
		
			
				|  |  | +            <field name="view_mode">kanban,form,tree</field>
 | 
	
		
			
				|  |  | +        </record>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <menuitem
 | 
	
		
			
				|  |  | +            name="Curva de productos"
 | 
	
		
			
				|  |  | +            id="menu_product_curve"
 | 
	
		
			
				|  |  | +            action="action_product_curve"
 | 
	
		
			
				|  |  | +            parent="base.menu_product"/>
 | 
	
		
			
				|  |  | +    </data>
 | 
	
		
			
				|  |  | +</openerp>
 |