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 would like to ask for an advice about many2one fields please.
I created a model called 'mymodel' which is connected to 'project.issue' like this:
_inherit = 'project.issue'
mymodel_id = fields.Many2one('mymodel',string='mymodel data', ondelete='cascade')
When I want to use 'mymodel_id' field in a view it works just fine when I add this into the xml file:
<field name="mymodel_id" />
Then 'name' of that record is displayed there.
But when I want to customize this further and display some more fields from the connected 'mymodel' record nothing more is displayed there. Basically everything inside <field name="mymodel_id">...</field> is ignored.I haven't found any way to display fields from my connected 'mymodel' record. This is my source code:
_name = 'mymodel'
testfield1 = fields.Char()
testfield2 = fields.Char()
<field name="id" />
<field name="testfield1" />
<field name="testfield2" />
Would you please give me some advice about this? Is this even possible?
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: 9/1/16, 9:03 AM|
|Seen: 376 times|
|Last updated: 9/1/16, 9:38 AM|