Initialize Model attributes of EDocument UN/CEFACT Invoice

The super __init__ method must be called to set some attributes used by Model.

Closes #12895
This commit is contained in:
Cédric Krier
2024-01-05 01:36:06 +01:00
parent 8a69a69cf6
commit 8eea0020b7
+1
View File
@@ -65,6 +65,7 @@ class Invoice(Model):
def __init__(self, invoice):
pool = Pool()
Invoice = pool.get('account.invoice')
super().__init__()
if int(invoice) >= 0:
invoice = Invoice(int(invoice))
with Transaction().set_context(language=invoice.party_lang):