Wednesday, June 18, 2025
1 change · saas-18.1
Resolved issues and error corrections
Fixes an issue where saving a vendor pricelist could fail after both the product and unit of measure were removed. This prevents an error screen and lets purchasing users save corrected vendor pricing records normally.
Original PR description
When the user saves the vendor pricelist after removing both the UoM and the product template, a traceback appears. Steps to reproduce the error: - Install ``purchase`` module - Enable ``Units of…
When the user saves the vendor pricelist after removing both the UoM and the product template, a traceback appears. Steps to reproduce the error: - Install ``purchase`` module - Enable ``Units of Measure & Packagings`` from settings - Go to Purchase > Configuration > Vendor Pricelists > New > Add Vendor > Save - Now add any Product > remove the uom and product > Save Traceback: ``` RecursionError: maximum recursion depth exceeded ``` https://github.com/odoo/odoo/blob/06733a16cff904887c8a5ec9e2d2ba591f252636/addons/product/models/product_supplierinfo.py#L117-L118 When the user removes both the product and UoM from a vendor pricelist, the condition becomes true, and attempts to reassign the product UoM from ``supplier.product_tmpl_id.uom_id``. However, since ``product_tmpl_id`` is also cleared, this causes repeated assignments and eventually triggers a RecursionError during write operations. sentry-6666831551 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr