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.
'name': fields.integer('Storage Type'),
'server_id': fields.one2many('footage.server.id','server_id', 'Server ID'),
When I put integer value it works fine but I want server_id to be char field. How to do that?
The server_id is always going to be the link to another record (in this case many records), so you should keep the field like that.
However, I think what you need is a related field. This can be the name of the archieve storage type, based on the field as it is filled in. So for example:
'related_server_name('server_id', 'name', type='char')
"server_id" in this case is the field that you already made. "name" is the field on the object you are referring to and "type" indicates that it should be shown as a character field in this case.
You should never have to worry about the input for relational fields yourself. The ORM does that for 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: 8/6/14, 8:00 AM|
|Seen: 457 times|
|Last updated: 3/16/15, 8:10 AM|