Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5066 มุมมอง

I have a field app_configuration_template_id which is one2many.  
 <field name="app_configuration_template_ids" widget="many2many_tags" options="{'no_create_edit': True}" />

How can I trigger a method when I select or deselect multiple records with the field app_configuration_template_ids? 

@api.onchange('app_configuration_template_ids') does not work


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

how can you trigger onchange if the no_create and no_edit are true? onchange invokes when any edit or create is done or should assign a value from somewhere. Also ensure @api.onchange('app_configuration_template_ids') is defined in the field model.

อวตาร
ละทิ้ง
ผู้เขียน

Thanks for your help.

I just want to select some app_configuration_template_ids and not edit/create. app_configuration_template_ids are defined before.

I just want to trigger the method, as soon I select one of the template.

Yes, app_configuration_template_ids is defined in the model.

I deleted options="{'no_create_edit': True}" but still not work.

Any suggestion?

update question with your model

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 22
18535
0
ก.ย. 20
2864
3
ก.ค. 19
5419
2
ก.ค. 18
4535
0
เม.ย. 16
3204