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.
Yes, you can. From method of your button you can call your onchange method. Onchange will return dictionary, you have to fetch values from dictionary and pass that dictionary in write method.
def your_btn_method(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
#Pass required fields value as a parameter in onchange
res = self.your_onchange(cr, uid, [rec.id], rec.field1, rec.field2)
self.write(cr, uid, [rec.id], res.get('values'), context=context)
Hope this will help 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: 9/18/14, 7:31 AM|
|Seen: 2451 times|
|Last updated: 3/16/15, 8:10 AM|