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

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
5
ก.ย. 20
12879
1
มี.ค. 15
5359
0
มี.ค. 15
4042
2
มี.ค. 15
7608
6
พ.ค. 24
71136