Skip to Content
Menu
This question has been flagged
1 Reply
2754 Views

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.

Avatar
Discard

Hello! Can you tell me how you solved this?

Author

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.

Best Answer

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`


Avatar
Discard
Related Posts Replies Views Activity
7
Oct 19
9235
2
Apr 18
4211
0
Aug 23
650
1
May 15
7763
0
Mar 15
7404