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

i have many2a stage_id field.
this field are used to statusbar.
i get the following error when i add the group_expand attribute.
-   An error occured in the owl lifecycle (see this Error's "cause" property)

- TypeError: Cannot read properties of undefined (reading 'map')

I have a look in the module project. they still add normally without error
who could help me was not.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

This is an example of stage_id many2one field

stage_id = fields.Many2one('maintenance.stage', string='Stage', ondelete='restrict', tracking=True,
group_expand='_read_group_stage_ids', default=_default_stage, copy=False)


@api.model
def _read_group_stage_ids(self, stages, domain, order):
""" Read group customization in order to display all the stages in the
kanban view, even if they are empty
"""
stage_ids = stages._search([], order=order, access_rights_uid=SUPERUSER_ID)
return stages.browse(stage_ids)

Regards

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 23
3569
2
thg 5 23
3315
1
thg 4 24
1581
2
thg 2 24
2210
3
thg 12 23
5931