Skip to content

Commit

Permalink
[10.0] web_widget_x2many_2d_matrix: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Pigeon authored and fmdl committed May 1, 2018
1 parent 3ff39d9 commit f23e623
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions web_widget_x2many_2d_matrix/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ This assumes that my_field refers to a model with the fields `x`, `y` and
`value`. If your fields are named differently, pass the correct names as
attributes::

<field name="my_field" widget="x2many_2d_matrix" field_x_axis="my_field1" field_y_axis="my_field2" field_value="my_field3" />
<field name="my_field" widget="x2many_2d_matrix" field_x_axis="my_field1" field_y_axis="my_field2" field_value="my_field3">
<tree>
<field name="my_field"/>
<field name="my_field1"/>
<field name="my_field2"/>
<field name="my_field3"/>
</tree>
</field>

You can pass the following parameters:

Expand Down Expand Up @@ -115,7 +122,14 @@ the field in the default function::

Now in our wizard, we can use::

<field name="task_ids" widget="x2many_2d_matrix" field_x_axis="project_id" field_y_axis="user_id" field_value="planned_hours" />
<field name="task_ids" widget="x2many_2d_matrix" field_x_axis="project_id" field_y_axis="user_id" field_value="planned_hours">
<tree>
<field name="task_ids"/>
<field name="project_id"/>
<field name="user_id"/>
<field name="planned_hours"/>
</tree>
</field>

Note that all values in the matrix must exist, so you need to create them
previously if not present, but you can control visually the editability of
Expand Down

0 comments on commit f23e623

Please sign in to comment.