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

Hi,


I added a field called invoice_id on stock.picking. I want to add some domain to show only sale invoices or purchase invoices depending on picking_type. Any ideas?


I have this:


invoice_id = fields.Many2one('account.move','Invoice', domain=lambda self: [('type', 'in', ['in_invoice','in_refund'] if self.picking_type_id.id == 1 else ['out_invoice','out_refund'])])

아바타
취소
베스트 답변

You can follow this: https://youtu.be/XGqXEL2qQmE 

Hope it helps, Thanks

아바타
취소
관련 게시물 답글 화면 활동
5
9월 20
12916
1
3월 15
5428
0
3월 15
4082
2
3월 15
7641
6
5월 24
71212