From 47020806deb0e4537bdfaabc7e7cbee307f63d7f Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 29 Sep 2020 14:14:21 +0000 Subject: [PATCH] [FIX] purchase: Amount_tax not updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- addons/purchase/models/purchase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index d0bdbc3362d..18bf55b5801 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -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({