跳至內容
選單
此問題已被標幟

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
12873
1
3月 15
5353
0
3月 15
4040
2
3月 15
7602
6
5月 24
71135