Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4017 Zobrazení

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
Zrušit
Nejlepší odpověď

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

Hope it helps, Thanks

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
5
zář 20
12847
1
bře 15
5330
0
bře 15
4002
2
bře 15
7554
6
kvě 24
71051