Se rendre au contenu
Menu
Cette question a été signalée

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
Ignorer
Meilleure réponse

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

Hope it helps, Thanks

Avatar
Ignorer
Publications associées Réponses Vues Activité
5
sept. 20
12875
1
mars 15
5354
0
mars 15
4041
2
mars 15
7605
6
mai 24
71135