[FIX] purchase: Amount_tax not updated
Steps to reproduce the bug: - Create a purchase order P with one line L - Set a tax of 10%, a quantity of 1 and a unit price of 100€ on L - Save P - Edit P and change the unit price of L to 120€ Bug: The amount_tax was not updated until you saved opw:2341757 closes odoo/odoo#58912 X-original-commit: d7598086b8ac642f2cfe497ab6e33e380edb244a Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -25,6 +25,7 @@ class PurchaseOrder(models.Model):
|
||||
for order in self:
|
||||
amount_untaxed = amount_tax = 0.0
|
||||
for line in order.order_line:
|
||||
line._compute_amount()
|
||||
amount_untaxed += line.price_subtotal
|
||||
amount_tax += line.price_tax
|
||||
order.update({
|
||||
|
||||
Reference in New Issue
Block a user