Hello Every one...
How to pass value of many2one field in multiple one2many lines in odoo 9. i.e when i select many2one field that value should pass in multiple one2many lines. Please let me know.
Thanks in advance.....
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello Every one...
How to pass value of many2one field in multiple one2many lines in odoo 9. i.e when i select many2one field that value should pass in multiple one2many lines. Please let me know.
Thanks in advance.....
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
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
lip 22
|
11775 | ||
|
0
lut 16
|
4209 | ||
odoo onchange function on one2many field
Rozwiązane
|
|
3
paź 22
|
21303 | |
|
0
lut 21
|
3741 | ||
|
0
lip 16
|
3833 |
you do not need to pass the values, all values of current object resides in self.
You should update your question with your attempts with code, else question should be closed.
Thanks now it's resolved