Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4045 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Hope it helps, Thanks

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
5
sept. 20
12872
1
mar. 15
5352
0
mar. 15
4039
2
mar. 15
7601
6
mai 24
71134