Odoo Aide

0

0
3 Answers
1
Husam Mustafa
02/07/2017 08:06

the value will be available inside "self"

you may define your onchange function using the new api as follow


@api.onchange('your_many_to_one_field')

def onchange_your_many_to_one_field(self):

   # if you want to access the many2one it will be inside self

    your_many2one_value=self.your_many_to_one_field

   #you can pass the value to one2many field by using write function

    self.your_one2many_field.write({'column_to_be_affected':your_many2one_value})



Regards,

Husam Mustafa

Poser une question
Writer
Keep Informed
1 Abonné(e)s
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now