Odoo Help


This community 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.


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

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


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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