changeset 66be3877c762 in modules/web_shop_shopify:default
details: 
https://hg.tryton.org/modules/web_shop_shopify?cmd=changeset&node=66be3877c762
description:
        Save and update taxes to apply tax adjustment on new invoice

        issue11719
        review411791003
diffstat:

 sale.py |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r 7817e8c48d79 -r 66be3877c762 sale.py
--- a/sale.py   Mon Sep 19 21:25:55 2022 +0200
+++ b/sale.py   Sun Sep 25 20:29:57 2022 +0200
@@ -151,6 +151,8 @@
         Currency = pool.get('currency.currency')
         invoice = super().create_invoice()
         if invoice and self.shopify_tax_adjustment:
+            invoice.save()
+            invoice.update_taxes()
             adjustment = Currency.compute(
                 self.currency, self.shopify_tax_adjustment, invoice.currency,
                 round=False)
@@ -175,6 +177,7 @@
                         break
             invoice.taxes = invoice.taxes
             invoice.save()
+            invoice.update_taxes()
         return invoice
 
     @classmethod

Reply via email to