[FIX] sale: name get uniformize API

This commit makes the override of the `name_search` more
consistent the basic implementation of the ORM (using lazy
name_get and supports the `name_get_uid` parameters)

Task-1911581
This commit is contained in:
jem-odoo
2019-08-21 11:22:58 +00:00
parent 7c5ce75aeb
commit 1f77ff3cd6
+1 -1
View File
@@ -445,7 +445,7 @@ class SaleOrder(models.Model):
['|', ('name', operator, name), ('partner_id.name', operator, name)]
])
order_ids = self._search(domain, limit=limit, access_rights_uid=name_get_uid)
return self.browse(order_ids).name_get()
return models.lazy_name_get(self.browse(order_ids).with_user(name_get_uid))
return super(SaleOrder, self)._name_search(name, args=args, operator=operator, limit=limit, name_get_uid=name_get_uid)
def _prepare_invoice(self):