details: https://code.tryton.org/tryton/commit/3e9926ae485e
branch: 7.6
user: Cédric Krier <[email protected]>
date: Sat Jan 17 12:53:33 2026 +0100
description:
Always return a date for tax date of TaxableMixin
Closes #14486
(grafted from b2ab8b67ca33fe466bc1be9712de08ec26d6ea80)
diffstat:
modules/account_invoice/invoice.py | 2 ++
modules/sale_point/sale.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 67349b4d1cd7 -r 3e9926ae485e modules/account_invoice/invoice.py
--- a/modules/account_invoice/invoice.py Fri Jan 16 13:16:50 2026 +0100
+++ b/modules/account_invoice/invoice.py Sat Jan 17 12:53:33 2026 +0100
@@ -2593,6 +2593,8 @@
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 -r 67349b4d1cd7 -r 3e9926ae485e modules/sale_point/sale.py
--- a/modules/sale_point/sale.py Fri Jan 16 13:16:50 2026 +0100
+++ b/modules/sale_point/sale.py Sat Jan 17 12:53:33 2026 +0100
@@ -448,7 +448,7 @@
@property
def tax_date(self):
- return self.date
+ return self.date or super().tax_date
class POSSaleLine(ModelSQL, ModelView, TaxableMixin):
@@ -721,7 +721,7 @@
@property
def tax_date(self):
- return self.sale.date
+ return self.sale.date or super().tax_date
class POSCashSession(Workflow, ModelSQL, ModelView):