Add start/end date to tax rule line

issue9505
review317981002
This commit is contained in:
Cédric Krier committed 2020-09-05 22:12:11 +02:00
1 parent a852e2d51d
commit 01b0a5895e
1 file changed
+9 -1
+9 -1
View File
@@ -1945,11 +1945,19 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
taxes.append(tax.id)
return taxes
@fields.depends('invoice',
'_parent_invoice.accounting_date', '_parent_invoice.invoice_date')
def _get_tax_rule_pattern(self):
'''
Get tax rule pattern
'''
return {}
if self.invoice:
date = self.invoice.accounting_date or self.invoice.invoice_date
else:
date = None
return {
'date': date,
}
@fields.depends('product', 'unit', '_parent_invoice.type',
'_parent_invoice.party', 'party', 'invoice', 'invoice_type',