Skip to Content
मेन्यू
This question has been flagged

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
Discard
Best Answer

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

Hope it helps, Thanks

Avatar
Discard
Related Posts Replies Views Activity
5
सित॰ 20
12837
1
मार्च 15
5321
0
मार्च 15
3995
2
मार्च 15
7544
6
मई 24
71012