Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4348 Widoki

Hi Odoo'ers,


We create invoices via the Odoo API successfully in V15. When running the exact same code against the same database in Odoo V16, we get a failure here:

ValueError: Invalid field 'exclude_from_invoice_tab' on model 'account.move.line' " 


I checked the database fields and found that the field 'exclude_from_invoice_tab' is indeed removed from the database in Odoo V16.


Would it be safe and as easy as excluding this field when creating invoice lines, and did anyone maybe go through this process already and is able to give me pointers of changes in the accounting module that would need to be considered to get the invoices to be created successfully in Odoo V16?


I would really appreciate any help.

Awatar
Odrzuć

Hello! Can you tell me how you solved this?

Autor

Hey Abhinav,

Unfortunately - there is no easy answer. The info provided by "Digital Domus s.n.c" should be considered, but it is quite a project - out company had to delay our Odoo 16 upgrade because of this. Sorry for not being able to be of more help, but even once my company's devs get this sorted, there simply isn't a very quick and dirty answer to this. The Odoo API require the dev to fully understand the underlying database structure of the Odoo system, and create the table entries into the database (via API) exactly as how the front end would do it. It's a mission my friend.

Configure the Odoo log file to show you the calls, do what you want in Odoo, then review the log to learn which calls with which data are needed - https://www.odoo.com/forum/help-1/how-can-i-see-which-api-calls-are-made-to-learn-what-odoo-is-doing-at-specific-times-183911

Najlepsza odpowiedź

Invocing got another refactoring from V15->V16, luckly smaller than V12->V13
The details are here
https://github.com/odoo/odoo/commit/d8d47f9ff8554f4b39487fd2f13c153c7d6f958d

About your missing field, the key part is

By simplicity, and also because it makes more sense, some boolean fields have been merged into `display_type`: * `is_rounding_line` * `exclude_from_invoice_tab` * `is_anglo_saxon_line`


Awatar
Odrzuć

Thank you, this was helpful.

Powiązane posty Odpowiedzi Widoki Czynność
7
paź 19
10553
2
kwi 18
5320
0
sie 23
1437
1
maj 15
8929
0
mar 15
8787