تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5043 أدوات العرض

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يناير 22
18499
0
سبتمبر 20
2816
3
يوليو 19
5403
2
يوليو 18
4508
0
أبريل 16
3170