İçereği Atla
Menü
Bu soru işaretlendi
9470 Görünümler

I created a new field in res.partner model, named rplc. This field is a one2many pointing to other model named res.partner.link.category.

I've checked that if I select rplc in the advanced search, it's filtering by the name or _rec_name of the records of res.partner.link.category. For example, if I go to the advanced search of partners, select rplc and write "Friend" as the content, it looks for every record of res.partner.link.category whose name's "Friend".

Now, my question: res.partner.link.category has other columns (in addition to name), one of them is type.

How can I do if I want to create a filter in the advanced search of res.partner selecting not only name but also type of res.partner.link.category? For example, I want to see every partner whose rplc has any record with name "Friend" and type "Good".

Is this possible? Thank you in advance!

Avatar
Vazgeç
Üretici

Sorry, I forgot to specify it, it's a v7.

Could you solve this issue?

Üretici

@Diego Calzadilla Now I'm looking why I didn't post my answer earlier and that's because I didn't manage to solve that issue exactly, I have to do a workaround, and I think the final solution is not the answer to this question. In my case, I only wanted to show the *rplc* records which the searched name and always type "*Good*". That was an advantage to do it next way: I had created a one2many of type function, and used the property *fnct_search*. From this property you can call a function made by yourself (you are going to receive the args the user wrote in the search, including the operator). In this function, you can do what you want, but you must return a *domain* (for example: [('id', in, your_list_of_ids)])

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Mar 15
5539
2
Kas 23
3199
7
Nis 21
20618
1
Eki 20
4970
1
Tem 19
10742