Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
4219 Weergaven

I've a model which inherits a field from another one:

class 2ndclass(models.Model):

    _name = 'mymodel_name'

    _inherits = {'1stclass': 'id_1stclass'}

    id_1stclass = fields.Many2one('1stclass', 'First Class', widget="many2one_list")

When I create a new object, there is a small arrow near 'First Class'. If I click on It, I get this popup error:

Odoo Client Error

TypeError: this.sidebar is undefined

http://localhost:8069/web/js/web.assets_backend/c686f43:3994

Below this popup, there is another one which allows to modify the selected 1stclass id.

How can I solve it?

Thanks!


Avatar
Annuleer

Do you have this widget many2one_list?

Beste antwoord

Try this:

Python:

class 2ndclass(models.Model):

_name = 'mymodel_name'

_inherits = {'1stclass': 'id_1stclass'}

id_1stclass = fields.Many2one('1stclass', 'First Class')

XML:

<field name="id_1stclass" widget="many2one_list">

Regards.

Avatar
Annuleer
Auteur

This haven't solved the problem.

Gerelateerde posts Antwoorden Weergaven Activiteit
2
dec. 22
14770
1
nov. 21
4892
0
jan. 21
2260
8
mei 20
7773
0
dec. 23
2911