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

I am working in odoo 15 enterprise, I am inheriting account move and I have this field:

status_test = fields.Selection([('manual','Factura Manual'),('pending_approval', 'Pendiente de Aprobacion'),

                                   ('paid', 'Pagada'),

                                   ('not_paid', 'No Pagada'),

                                   ('cancel', 'Cancelada')], default="manual", string="Status test",

                                  compute='_compute_status_test', search='_search_field')


To be able to filter without the need to use store True I did this:

def _search_field(self, operator, value):

        filtered_records = self.search([]).filtered(lambda x: x.status_test == value)

        return [('id', operator, [x.id for x in filtered_records] if filtered_records else False)]


And it works without problems, but now I want to be able to group by the status_test field without the need to use store True, is there a way?

The reason I don't want to use store True is because I am working with a database with a high record rate, and if I use store True everything will become too slow.

Thank you, and sorry for the inconvenience.

Odoo 15 enterprise.

아바타
취소
관련 게시물 답글 화면 활동
3
9월 24
933
0
8월 24
588
0
12월 23
1004
0
10월 21
2548
1
7월 21
3233