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.
Hi to all, does any one knows how to prepopulate a data on a one2many field? I mean, when a user clicks "Add an item" on a one2many fields some fields from this line will populated? I have here the image.
Any help is much appreciated.
You could use context to set the values of the fields at one2many field
In res.partner table, odoo uses context to pass the values of Company to its Contacts. Refer:https://github.com/odoo/odoo/blob/8.0/openerp/addons/base/res/res_partner_view.xml#L191
(*) default_FIELDNAME ==> set value for your particular field
(*) search_default_FILTERNAME ==> sets the search filter by default
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: 2/10/15, 5:45 AM|
|Seen: 831 times|
|Last updated: 3/16/15, 8:10 AM|