Browse Source

[10.0] web_widget_x2many_2d_matrix: update README

pull/1106/head
Cédric Pigeon 7 years ago
committed by Jairo Llopis
parent
commit
a2ab207c1d
  1. 18
      web_widget_x2many_2d_matrix/README.rst

18
web_widget_x2many_2d_matrix/README.rst

@ -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 `value`. If your fields are named differently, pass the correct names as
attributes:: 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: You can pass the following parameters:
@ -115,7 +122,14 @@ the field in the default function::
Now in our wizard, we can use:: 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 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 previously if not present, but you can control visually the editability of

Loading…
Cancel
Save