Skip to content

Commit d1cb7e8

Browse files
committed
[FWPORT] account_einvoice_generate: add hook for tax's UNECE Due Date Type Code
1 parent bbdbd3e commit d1cb7e8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

account_einvoice_generate/models/account_move.py

+12
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,15 @@ def _xml_format_in_pdf_invoice(self):
3131
return xml_format
3232
else:
3333
return False
34+
35+
def _get_unece_due_date_type_code(self):
36+
"""account.tax has a selection field 'tax_exigibility' with 2 possible values:
37+
'on_invoice' or 'on_payment'.
38+
As a consequence, tax exigibility is a property of the invoice line.
39+
But, in real life (at least in France), tax exigibility is a property
40+
of the invoice, not the invoice line!
41+
This method is a hook to get the UNECE due date type code from the invoice
42+
instead of the tax. If it returns None, Odoo will get it from the tax.
43+
"""
44+
self.ensure_one()
45+
return None

0 commit comments

Comments
 (0)