콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
5592 화면

I've added a new field to the res.partner model. This field dummy is a many2many, related to a customized model named res.partner.link.category. In the tree view of partners, if I click on search and then on advanced search, I can create a new filter, selecting a field from res.partner and setting its value/s.

The problem is that I can't see my new field in the advanced search. There's an existing many2many field in res.partner, named category_id, and I can see this one there, in the advanced search. I need my field to behave like that one.

Can anyone help me, please?

아바타
취소
베스트 답변

If you need to search using Advanced search, then the field needs to be available in your database.  i.e. store=True is a must.

So, add store=True for your related field.

아바타
취소
작성자

Thank you! That's a good point, but I've just found the problem and in my case was the one I'm going to post now.

작성자 베스트 답변

In my case, the problem is that my table res.partner.link.category didn't have a column named name, and it didn't have set the attribute _rec_name, so it was impossible to find anything.

아바타
취소

Not necessarily. You can still have a name_search method defined to be used to search the records. But I guess, it is not currently available as well.

관련 게시물 답글 화면 활동
0
4월 21
9541
2
11월 23
3247
7
4월 21
20687
1
10월 20
5005
2
11월 16
4328