From b2bb8ec2d4209424e6d09db1bb3ceda5c4bcfa70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 17 Jan 2026 12:53:33 +0100 Subject: [PATCH] Always return a date for tax date of TaxableMixin Closes #14486 (grafted from b2ab8b67ca33fe466bc1be9712de08ec26d6ea80) --HG-- branch : 7.0 --- modules/account_invoice/invoice.py | 2 ++ modules/sale_point/sale.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/account_invoice/invoice.py b/modules/account_invoice/invoice.py index 93fa23fc97..d85075c2e6 100644 --- a/modules/account_invoice/invoice.py +++ b/modules/account_invoice/invoice.py @@ -2497,6 +2497,8 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin): return self.taxes_date elif hasattr(self, 'invoice') and hasattr(self.invoice, 'tax_date'): return self.invoice.tax_date + else: + return super().tax_date def _get_tax_context(self): if self.invoice: diff --git a/modules/sale_point/sale.py b/modules/sale_point/sale.py index b54cb8c734..cc61413b95 100644 --- a/modules/sale_point/sale.py +++ b/modules/sale_point/sale.py @@ -440,7 +440,7 @@ class POSSale(Workflow, ModelSQL, ModelView, TaxableMixin): @property def tax_date(self): - return self.date + return self.date or super().tax_date class POSSaleLine(ModelSQL, ModelView, TaxableMixin): @@ -714,7 +714,7 @@ class POSSaleLine(ModelSQL, ModelView, TaxableMixin): @property def tax_date(self): - return self.sale.date + return self.sale.date or super().tax_date class POSCashSession(Workflow, ModelSQL, ModelView):