[10.0] web_widget_x2many_2d_matrix: update README

This commit is contained in:
Cédric Pigeon
2017-06-21 16:56:59 +02:00
committed by Simone Orsi
parent 936e9c23dd
commit 22aaa168c8

View File

@@ -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