Always return a date for tax date of TaxableMixin
Closes #14486 (grafted from b2ab8b67ca33fe466bc1be9712de08ec26d6ea80) --HG-- branch : 7.0
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user