Add search on EAN13 in product_usability

This commit is contained in:
Alexis de Lattre
2016-01-13 11:51:13 +01:00
parent 540d7cf82c
commit 140349e4d8
2 changed files with 24 additions and 1 deletions

View File

@@ -89,6 +89,29 @@
</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>
</data>
</openerp>

View File

@@ -31,7 +31,7 @@
Sale Purchase No Product Template
=================================
This module replaces the menu entries for product.template by menu entries for product.product in the *Sales*, *Purchases* and *Warehouse* menu entry. The only remaining menu entry for product.template is in the menu *Sales > Configuration > Product Categories and Attributes*.
This module replaces the menu entries for product.template by menu entries for product.product in the *Sales*, *Purchases* and *Warehouse* menu entry. With this module, the only menu entry for product.template is in the menu *Sales > Configuration > Product Categories and Attributes*.
This module also switches to the tree view by default for Product menu entries, instead of the kanban view.