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

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)])

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Search a message แก้ไขแล้ว
1
ก.พ. 25
1019
0
ก.ย. 23
2056
2
มิ.ย. 23
3771
7
ต.ค. 20
10079
1
ก.ค. 20
3200