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

Hello guys, I created a Many2many field in Odoo and I would like add a filter in my search view filtering by one of the fields of that Many2many field, is that possible? Thanks!            

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

Hello Jorge,

        Many2many field is not directly being used in search view. However one other option is available, You should follow that alternate way :-
        For example :-
            1)  If sale order having invoice_ids many2many field.
            2)  First make one invoice_number field in sale order.
            3)  In sale order field invoice_ids objects is account.invoice
                    So call account.invoice create method, you can get Source Document (origin) = SO reference number
            4)  Base on origin you can search sale order id and write that invoice number in sale order's field "invoice_number"
            5)  Then "invoice_number" is use in search view.

    Hope this will help you!
    Thanks. 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 19
11398
1
thg 6 19
7174
3
thg 4 17
3074
1
thg 2 23
6140
1
thg 10 22
4314