Saturday, November 2, 2024
1 change · master
Miscellaneous changes
Consider the case that "Predict vendor bill product" is activated in the settings and we upload / import a vendor bill with a single line. In case the product on the line could not be determined by the import function it is predicted afterwards (since the setting is enabled). But changing the product triggers i.e. a recompute of the unit price (`price_unit`) and taxes (`tax_ids`) based on the new product information. This is not what we want since the aforementioned values should be det
Original PR description
Consider the case that "Predict vendor bill product" is activated in the settings and we upload / import a vendor bill with a single line. In case the product on the line could not be determined by…
Consider the case that "Predict vendor bill product" is activated in the settings and we upload / import a vendor bill with a single line. In case the product on the line could not be determined by the import function it is predicted afterwards (since the setting is enabled). But changing the product triggers i.e. a recompute of the unit price (`price_unit`) and taxes (`tax_ids`) based on the new product information. This is not what we want since the aforementioned values should be determined by the import even in case the product is not found. After this commit we protect the unit price and taxes fields during any (product) prediction in case they are set. (We do update the unit price and tax if it is 0 or there are no taxes.) Reproduce 1. Activate "Predict vendor bill product" in the settings 2. Create Customer OpsWay * country = Poland * VAT = PL8992922295 3. Create 3 Vendor Bills manually * date in the past * customer = OpsWay * single invoice line: with product "Commissions" * Confirm 4. Import the PDF attached on the task in Vendor Bills. * It has a single line with quantity 1 and unit price 1,322.40 5. A bill with a single line is created: product = "Commissions" unit price = 0.0 total = 0 task-4279931 Forward-Port-Of: odoo/enterprise#73191 Forward-Port-Of: odoo/enterprise#72625