mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_multi_level:
* remove unneded _rec_name. * extend _name_search to be more inline with name_get.
This commit is contained in:
committed by
JasminSForgeFlow
parent
809faafb08
commit
106e6fd14b
@@ -140,7 +140,18 @@ class ProductMRPArea(models.Model):
|
||||
self, name, args=None, operator="ilike", limit=100, name_get_uid=None
|
||||
):
|
||||
if operator in ("ilike", "like", "=", "=like", "=ilike"):
|
||||
args = expression.AND([args or [], [("product_id.name", operator, name)]])
|
||||
args = expression.AND(
|
||||
[
|
||||
args or [],
|
||||
[
|
||||
"|",
|
||||
"|",
|
||||
("product_id.name", operator, name),
|
||||
("product_id.default_code", operator, name),
|
||||
("mrp_area_id.name", operator, name),
|
||||
],
|
||||
]
|
||||
)
|
||||
return super(ProductMRPArea, self)._name_search(
|
||||
name, args=args, operator=operator, limit=limit, name_get_uid=name_get_uid
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user