Odoo Help


OCA: 2D matrix for x2many fields - with Many2one value field

Tobias Frankl
on 8/14/15, 3:14 PM 1,305 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?


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/14/15, 3:14 PM
Seen: 1305 times
Last updated: 8/14/15, 3:15 PM