131 lines
5.2 KiB
XML
131 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
|
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
The licence is in the file __openerp__.py
|
|
-->
|
|
|
|
<openerp>
|
|
<data>
|
|
|
|
|
|
<record id="product_price_history_form" model="ir.ui.view">
|
|
<field name="name">product.price.history.form</field>
|
|
<field name="model">product.price.history</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Product Price History">
|
|
<group name="main">
|
|
<field name="product_template_id" invisible="not context.get('product_price_history_main_view')"/>
|
|
<field name="datetime"/>
|
|
<field name="cost"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_price_history_tree" model="ir.ui.view">
|
|
<field name="name">product.price.history.tree</field>
|
|
<field name="model">product.price.history</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Product Price History" editable="bottom">
|
|
<field name="product_template_id" invisible="not context.get('product_price_history_main_view')"/>
|
|
<field name="datetime"/>
|
|
<field name="cost"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_price_history_search" model="ir.ui.view">
|
|
<field name="name">product.price.history.search</field>
|
|
<field name="model">product.price.history</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Product Price History">
|
|
<field name="product_template_id"/>
|
|
<group string="Group By" name="groupby">
|
|
<filter name="product_tmpl_groupby" string="Product" context="{'group_by': 'product_template_id'}"/>
|
|
<filter name="datetime_groupby" string="Date" context="{'group_by': 'datetime:month'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_price_history_action" model="ir.actions.act_window">
|
|
<field name="name">Product Price History</field>
|
|
<field name="res_model">product.price.history</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="context">{'product_price_history_main_view': True}</field>
|
|
</record>
|
|
|
|
<menuitem id="product_price_history_menu" action="product_price_history_action"
|
|
parent="product.prod_config_main" sequence="55"/>
|
|
|
|
<!-- product.template form view -->
|
|
<record id="product_template_form_view" model="ir.ui.view">
|
|
<field name="name">usability.product.template.form</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_form_view" />
|
|
<field name="arch" type="xml">
|
|
<group name="general" position="after">
|
|
<group name="price_history" string="Price History">
|
|
<field name="price_history_ids" nolabel="1"/>
|
|
</group>
|
|
</group>
|
|
<!-- START for wider 'name' field -->
|
|
<!-- Don't make it too big, othesize computers with small resolutions
|
|
will see the product name + image under the block of buttons -->
|
|
<div class="oe_left" position="attributes">
|
|
<attribute name="style">width: 700px;</attribute>
|
|
</div>
|
|
<div class="oe_title" position="attributes">
|
|
<attribute name="style">width: 600px;</attribute>
|
|
</div>
|
|
<field name="name" position="attributes">
|
|
<attribute name="class"></attribute>
|
|
</field>
|
|
<!-- END for wider 'name' field -->
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Also search on EAN13 -->
|
|
<record id="product_template_search_view" model="ir.ui.view">
|
|
<field name="name">product_usability.product.template.search</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="attributes">
|
|
<attribute name="filter_domain">['|', '|', ('name', 'ilike', self), ('default_code', 'ilike', self), ('ean13', '=', self)]</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- product.product -->
|
|
<record id="product_search_form_view" model="ir.ui.view">
|
|
<field name="name">product_usability.product.search</field>
|
|
<field name="model">product.product</field>
|
|
<field name="inherit_id" ref="product.product_search_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<field name="name" position="attributes">
|
|
<attribute name="filter_domain">['|', '|', ('name', 'ilike', self), ('default_code', 'ilike', self), ('ean13', '=', self)]</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- product.pricelist -->
|
|
<record id="product_pricelist_view_tree" model="ir.ui.view">
|
|
<field name="name">usability.product.pricelist.tree</field>
|
|
<field name="model">product.pricelist</field>
|
|
<field name="inherit_id" ref="product.product_pricelist_view_tree"/>
|
|
<field name="arch" type="xml">
|
|
<field name="currency_id" position="after">
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
</data>
|
|
</openerp>
|