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.
Hello, I have custom module that is inherited from res_partner. Until I installed Social (mail) module everithing was fine, but when I installed it I cannot save any record in the database, unless records made in my custom module. When I try to create new record in Customers, or create a new company (modifying existing company is OK), the following error occurs:
Attribute Error: No field image found in record.browse(my_mudule_name, int)
The traceback reports an error in mail_thread.create() method and in res_partner module, but the error occurs with context "my_module_name"!!!
The strange thing is that I can CRUD records with my custom module withoot any errors and mail_thread correctly records all actions (saw the report log), but no create operations are possible in any base module (Address book, Products, etc.)....
Please, help me sort this out if anyone has been where I'm... Any suggestions are very appeciated!
After debugging I figured out (or at least think so) where is the problem:
It turns out that
create method in
res_partner.py and therefore if you have inheritance of type
_table in your custom module it collects wrong ids - not from original res_partner table but from the inherited table of your custom module and throws an exception...
The workaround I decide to use is to change the inheritance type as to accommodate everything in the res_partner table. The only inconvenience I found so far is that now I need to make all my custom module views inherited from
res_partner_view.xml in order to display data for my module correctly.
If someone know better way to achieve this without view inheritance, please drop me a line. Thanks to all, hope that this is useful.
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: 2/22/14, 1:29 PM|
|Seen: 1431 times|
|Last updated: 3/16/15, 8:10 AM|