跳至內容
選單
此問題已被標幟
4620 瀏覽次數

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

頭像
捨棄
作者

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

相關帖文 回覆 瀏覽次數 活動
2
11月 23
3056
0
5月 23
2718
2
1月 23
3566
7
4月 21
20384
1
10月 20
4804