Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
4005 Visualizações

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
Cancelar
Melhor resposta

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

Hope it helps, Thanks

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
5
set. 20
12844
1
mar. 15
5325
0
mar. 15
3998
2
mar. 15
7551
6
mai. 24
71023