Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3084 Weergaven

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.

Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 23
3566
2
mei 23
3310
1
apr. 24
1576
2
feb. 24
2209
3
dec. 23
5926