[FIX] point_of_sale: exclude internal reference in loaded products
Previously, products loaded from the background included the internal reference in their displayed name. This behavior was due to the 'display_default_code' context, which prevents the inclusion of 'default_code' in the product name, not being utilized within the 'get_pos_ui_product_product_by_params' function. opw-3617195 closes odoo/odoo#145644 X-original-commit: b6c87e4c3451fbb554557be95788c8e1a5e0332f Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com> Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit is contained in:
@@ -2116,6 +2116,7 @@ class PosSession(models.Model):
|
||||
:param custom_search_params: a dictionary containing params of a search_read()
|
||||
"""
|
||||
params = self._loader_params_product_product()
|
||||
self = self.with_context(**params['context'])
|
||||
# custom_search_params will take priority
|
||||
params['search_params'] = {**params['search_params'], **custom_search_params}
|
||||
products = self.env['product.product'].with_context(active_test=False).search_read(**params['search_params'])
|
||||
|
||||
Reference in New Issue
Block a user