Help

0

Implement onchange function in checkbox of One2many field

Avatar
Peter Nucom

Hi, I use the module web_one2many_selectable_10, now I want to know if is it possible to implement onchange method to the checkbox in every row on my one2many field?

Avatar
Discard
1 Answer
0
Best Answer

Hi peter,
Yes,it is possible to implement onchange method to the checkbox in every row on a one2many field.
Use the following code:

@api.onchange('field_name')
def onchange_field_name(self):
# get the required data in record
for line in record:
line.check_box_field_name = True

Regards

Avatar
Discard