İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4009 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt

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

Hope it helps, Thanks

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
5
Eyl 20
12847
1
Mar 15
5326
0
Mar 15
4000
2
Mar 15
7553
6
May 24
71034