details: https://code.tryton.org/tryton/commit/b2ab8b67ca33
branch: default
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
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 3d658b7f3aaa -r b2ab8b67ca33 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
@@ -2752,6 +2752,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 3d658b7f3aaa -r b2ab8b67ca33 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
@@ -446,7 +446,7 @@
@property
def tax_date(self):
- return self.date
+ return self.date or super().tax_date
class POSSaleLine(ModelSQL, ModelView, TaxableMixin):
@@ -719,7 +719,7 @@
@property
def tax_date(self):
- return self.sale.date
+ return self.sale.date or super().tax_date
class POSCashSession(Workflow, ModelSQL, ModelView):