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

I want to add a filter to a search view in whose domain I want to make reference to a field of another model, i.e:

<filter name="filter_name" string="Filter String" domain="[('field','=',ref(base.company).some_field)]" help="Filter by some field"/>

but I don't know how to do it, I also tried calling a method in the model, trying referencing self.env, no luck either way.

So my question is how can I add a 'dynamic domain' to my search filter, I want to filter by checking a value stored in another model, thanks

Ảnh đại diện
Huỷ bỏ
Tác giả

I want to avoid having to create a reference field in my model, it doesn't look right to have an extra field just for filtering purposes in my view

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 11 23
3105
0
thg 5 23
2767
2
thg 1 23
3596
7
thg 4 21
20472
1
thg 10 20
4850