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 already added some values in one2many field and on button click i want to update only one field value. How can i do that?
For example :
my one2many field stud_details have values:
Here rollno , name are already added and on Clicking BUTTon "UPDATE" the marks field need to get updated..
I need to add the same mark for all the students..
for say, for taking marks values having one integer field called Mark_update field, and on clicking the button "UPDATE" the values in Mark_update field need to get updated to the one2many Mark field for all student
You can Use write() method for updating the one2many field.
For example :
Here below is the code , here we can write mark for each record in one2many field.
for record in self.browse(cr,uid,ids,context=context):
for order in record.stud_details:
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: 8/17/16, 8:43 AM|
|Seen: 297 times|
|Last updated: 8/23/16, 3:22 AM|