Sunday, June 26, 2022
1 change · master
Miscellaneous changes
Steps to reproduce: 1- install sale, invoicing 2- create a product p with price pr 3- create a new Sales Order SO with p and edit the price to any other price than pr 4- create an invoice 5- go to SO, reduce quantity to 0 ( customer returns the item ) 6- the unit price is set back to pr and there is no way to edit it Bug: in 836f463c9778195a00bcf2f5290ddef18d8e75d5 the `_compute_price_unit` method was changed from onchange to depends which caused the edits now to be commited to
Original PR description
Steps to reproduce: 1- install sale, invoicing 2- create a product p with price pr 3- create a new Sales Order SO with p and edit the price to any other price than pr 4- create an invoice 5- go to SO, reduce quantity to 0 ( customer returns the item ) 6- the unit price is set back to pr and there is no way to edit it Bug: in 836f463c9778195a00bcf2f5290ddef18d8e75d5 the `_compute_price_unit` method was changed from onchange to depends which caused the edits now to be commited to memory. While it can be beneficial for other flows, for this specific use case, it is not Fix: make an exception for lines with already invoiced quantities OPW-2830824 Forward-Port-Of: odoo/odoo#92888 Forward-Port-Of: odoo/odoo#92084