[FIX] product, web: many2one child of value
Before this commit, when a product category had a similar name than an other e.g. ALL / Exp and ALL / Expenses When entering the list view of its products, it displayed the product linked to the category with the similar name e.g. When opening ALL/Exp products list, it displayed its products **plus** the products of ALL/Expenses After this commit the list view just contains the active category's products OPW 782905
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Product">
|
||||
<field name="name" string="Product" filter_domain="['|','|',('default_code','ilike',self),('name','ilike',self),('barcode','ilike',self)]"/>
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', raw_value)]"/>
|
||||
<separator/>
|
||||
<filter string="Services" name="services" domain="[('type','=','service')]"/>
|
||||
<filter string="Products" name="consumable" domain="[('type', 'in', ['consu', 'product'])]" help="Products your store in the inventory"/>
|
||||
|
||||
@@ -152,7 +152,7 @@ var Field = Input.extend( /** @lends instance.web.search.Field# */ {
|
||||
if (domain) {
|
||||
value_to_domain = function (facetValue) {
|
||||
return new data.CompoundDomain(domain)
|
||||
.set_eval_context({self: self.value_from(facetValue)});
|
||||
.set_eval_context({self: self.value_from(facetValue), raw_value: facetValue.attributes.value});
|
||||
};
|
||||
} else {
|
||||
value_to_domain = function (facetValue) {
|
||||
|
||||
Reference in New Issue
Block a user