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

I have created Automated Action on invoice object.

On Creation & Update

Server Action :

sale_order = env['sale.order'].search([('invoice_ids', '=', object.id)])
object.write({'comment': sale_order})

sale_order is display All sale order.

Any one can help to search on many2many field.


الصورة الرمزية
إهمال
أفضل إجابة

Try the below:

sale_order = self.env['sale.order'].search([("invoice_ids", "in", self.id)])

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 25
534
Search a message تم الحل
1
فبراير 25
1249
0
سبتمبر 23
2194
2
يونيو 23
4033
7
أكتوبر 20
10346