콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
12593 화면

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
7월 25
301
Search a message 해결 완료
1
2월 25
1105
0
9월 23
2106
2
6월 23
3837
7
10월 20
10179