Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Writing two models toghether, in the same module, shows me a key error "account.invoice" (inherited model)
I am writing this code:
_inherit = "res.partner"
field_ids = fields.Many2Many(........)
_inherit = "account.invoice"
field_myfield = fields.Char(....)
In this case, I am getting a "key error: account.invoice", but if put my_class_b in a separate module, everything works fine. Even get key error if y separate my_class_b in another file, and import it from __init__.py
Why is this for?
you made the thing! This was the cause! THANKS!
("Are you sure that your module depends on 'account' module in the __openerp__.py manifest? ")
In the merged module there was an empty depends declaration. I assumed that depends declaration was to force the module installation only, and as it was one of the main modules.
Cannot convert your comment as an answer because of karma. But you deserve. Thank you.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/29/15, 5:28 PM|
|Seen: 1942 times|
|Last updated: 12/28/16, 3:00 AM|