Skip to content

Commit

Permalink
FIX: Error on name_get on product search
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Aug 19, 2024
1 parent 8838f65 commit c094a8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plm/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
"name": "Product Lifecycle Management",
"version": "17.0.0.2",
"version": "17.0.0.3",
"author": "OmniaSolutions",
"website": "https://odooplm.omniasolutions.website",
"category": "Manufacturing/Product Lifecycle Management (PLM)",
Expand Down
8 changes: 2 additions & 6 deletions plm/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -1800,17 +1800,13 @@ def name_get(self):

@api.model
def _name_search(self, name, domain=None, operator='ilike', limit=None, order=None):
if not domain:
domain=[('engineering_code', 'ilike', name)]
else:
domain = expression.OR([domain,
[('engineering_code', 'ilike', name)]])
engineering_code_products = self.search([('engineering_code', 'ilike', name)])
product_ids = list(super(ProductProduct, self)._name_search(name,
domain,
operator,
limit,
order=None))
return list(set(product_ids))
return list(set(product_ids + engineering_code_products.ids))

@api.model
def getExpodedBom(self, ids):
Expand Down

0 comments on commit c094a8a

Please sign in to comment.