Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4018 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Hope it helps, Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
5
thg 9 20
12847
1
thg 3 15
5330
0
thg 3 15
4002
2
thg 3 15
7554
6
thg 5 24
71051