This question has been flagged
3842 Views

I try to use the oca widget to display and edit some data in a 2D Matrix.

Is this widget ment to be used different, or am I doing something wrong? It works well as long as "zustand" is a fields.Char

With the shown config, I have only empty value fields in the view.

Main Model:

class eqm_master(models.Model):
bf_tag_zustand_ids = fields.One2many('equi.bf_tag_zustand', 'master_eqm_id', string="TAG_Zustand",
track_visibility='onchange', ondelete='set null',)

related Model:

class bf_tag_zustand(models.Model):
tag_kurz = fields.Char(string="TAG kurz", related='tag_m_id.name_kurz', store="True")
bf_kurz = fields.Char(string="BF kurz", related='bf_id.name_kurz', store="True")
zustand = fields.Many2one('equi.tag_zustand_selection', string="Zustand")

form view:

<field name="bf_tag_zustand_ids" widget="x2many_2d_matrix" field_x_axis="tag_kurz" field_y_axis="bf_kurz" field_value="zustand"/> 

Do I need to change the widget, or am I just using it wrong?

Thanks


Avatar
Discard