Odoo Help


on_change did not working

aci aisha
on 4/15/15, 3:08 AM 430 views

I want to pass the value of residual(Balance) in account.invoice into another class named ip.local.

So i write an on_change function as follows.

def onchange_amount_total(self,cr,uid,ids,residual,file_no_tm,context=None):

#print file_type

print "start:::onchange_check_total"

file_no = self.browse(cr, uid,file_no_tm, context=None)

ip_obj = self.pool.get('ip.local')

ip_obj.browse(cr, uid,file_no.file_no_tm, context=None)

ip_obj.write(cr, uid,file_no,{'balance_payment':residual},context=None)

NB:.file_no_tm is a field of ip.local and it is used as a many2one in account.invoice.

       I want to change the 'balance_payment'' field with the value of residual when the value of residual is changing...


Your Answer

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.


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

2 follower(s)


Asked: 4/15/15, 3:08 AM
Seen: 430 times
Last updated: 4/15/15, 3:16 AM