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.
I have definided many2one fields in my table, when I look at my table appear only ids of records:
These are my field definitions:
'brand': fields.many2one('cm.brand', 'Marca', ondelete='restrict'),
'model': fields.many2one('cm.model', 'Modelo', ondelete='restrict')
In my table, I have something like this:
brand integer model integer
Instead of these integers(ids), I would like to have name value stored in the database, I tried adding a related field in my model:
'model_name': fields.related('model', 'name', readonly=True, type='char')
However, it doesn't make any change.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
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: 5/29/15, 12:17 PM|
|Seen: 786 times|
|Last updated: 5/19/16, 6:54 AM|