Odoo Help

0

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
10941
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

Top 10 Odoo contributor On Stackoverflow 

LinkedIn

Blog

Stackoverflow

Sudhir Arya
ERP Harbor Consulting Services
skype: 
sudhir@erpharbor.com 
Sudhir Arya (ERP Harbor Consulting Services)
On 9/18/14, 1:59 PM

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.

Sample:

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)
        if res.has_key('values'):
            self.write(cr, uid, [rec.id], res.get('values'), context=context)
    return True

Hope this will help you.

1
Andreas Stauder
On 9/18/14, 8:05 AM

Short: In the standard webclient not.

Before the action of the button is executed it makes a save (or create, when the record is new) and the form is reloaded anyway. This is done so, to have all data from the form on the server when executing the action of the button.

0
pankaj
On 9/18/14, 10:45 AM

actually m new to openerp..but i think we can trigger a function by a button click...we juz have to implement a workflow and in activity we can mentions the method which has to be triggered...also we must map button name with the signal in workflow transition..plz correct me if m wrong

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

Question tools

1 follower(s)

Stats

Asked: 9/18/14, 7:31 AM
Seen: 2815 times
Last updated: 3/16/15, 8:10 AM