Files
odoo_source/addons/product/models
Preksha Chouhan 19aef6396c [FIX] product: prevent getting value of domain from other method
While creating a new product in product category with barcode value in inventory
module, `_check_barcode_uniqueness` method is called. In which variable 'domain'
is passed, and getting wrong value.

Steps to Produce:-
1) Go to Inventory then configuration
2) Click on 'Product Categories' under products
3) Click/Create Product Category
4) Click stat button 'product'
5) Create a product
6) Then add barcode value
7) Click on Save
8) Trace-back will be generated

Reason:-

While creating new product from product category when user add the barcode value
in product form, the '_check_barcode_uniqueness' method is called. In this
method the value of 'domain' is getting updated by reference from variable
'domain' from method '_search' present in the same model.
This results in a traceback with the message

'Invalid field product.packaging.categ_id'.

Applying these changes will resolve this issue.

sentry - 4073963761

closes odoo/odoo#121072

X-original-commit: ce9889e314ae696773ce040f662569e281abe700
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-05-11 10:40:58 +02:00
..