From 96e40b52daad0c3be2302d1c014b047d6e13a744 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Thu, 27 Feb 2020 16:14:50 +0100 Subject: [PATCH] fix tax calculation after inserting invoice.line for global- or dealer-discount --- ext/3rd-party-addons/global_discount/models/invoice.py | 3 +++ ext/custom-addons/tz_dealer_discount/models/invoice.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ext/3rd-party-addons/global_discount/models/invoice.py b/ext/3rd-party-addons/global_discount/models/invoice.py index 88f3654a..07c7a11f 100755 --- a/ext/3rd-party-addons/global_discount/models/invoice.py +++ b/ext/3rd-party-addons/global_discount/models/invoice.py @@ -59,4 +59,7 @@ class Invoice(models.Model): 'invoice_line_tax_ids': [(6, 0, taxes_ids)], 'sequence': 100, }) + + super()._onchange_invoice_line_ids() + return True diff --git a/ext/custom-addons/tz_dealer_discount/models/invoice.py b/ext/custom-addons/tz_dealer_discount/models/invoice.py index 60b2cc47..1a858bce 100644 --- a/ext/custom-addons/tz_dealer_discount/models/invoice.py +++ b/ext/custom-addons/tz_dealer_discount/models/invoice.py @@ -91,4 +91,7 @@ class Invoice(models.Model): 'layout_category_id':layout_category_id.id, 'sequence': 99999, }) + + super()._onchange_invoice_line_ids() + return True