This module allows to show an x2many field with 3-tuples ($x_value,
$y_value, $value) in a table
@@ -435,12 +436,12 @@ 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">
- <tree>
+ <list>
<field name="my_field"/>
<field name="my_field1"/>
<field name="my_field2"/>
<field name="my_field3"/>
- </tree>
+ </list>
</field>
You can pass the following parameters:
@@ -459,12 +460,12 @@ hours for one task per project per user. In this case, we can use
project.task as our data model and point to it from our wizard. The
crucial part is that we fill the field in the default function:
-from odoo import fields, models
+from odoo import fields, models
-class MyWizard(models.TransientModel):
+class MyWizard(models.TransientModel):
_name = 'my.wizard'
- def _default_task_ids(self):
+ def _default_task_ids(self):
# your list of project should come from the context, some selection
# in a previous wizard or wherever else
projects = self.env['project.project'].browse([1, 2, 3])
@@ -493,12 +494,12 @@ crucial part is that we fill 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">
- <tree>
+ <list>
<field name="task_ids"/>
<field name="project_id"/>
<field name="user_id"/>
<field name="planned_hours"/>
- </tree>
+ </list>
</field>
@@ -542,7 +543,7 @@ keyboard will enter into the 1st cell until
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-feedback.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -579,13 +580,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
This module is maintained by the OCA.
-

+
+
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
Current maintainer:

-
This module is part of the OCA/web project on GitHub.
+
This module is part of the OCA/web project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_field/x2many_2d_matrix_field.esm.js b/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_field/x2many_2d_matrix_field.esm.js
index 40ca3ac50..7903fb069 100644
--- a/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_field/x2many_2d_matrix_field.esm.js
+++ b/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_field/x2many_2d_matrix_field.esm.js
@@ -1,8 +1,6 @@
-/** @odoo-module **/
-
import {Component} from "@odoo/owl";
import {X2Many2DMatrixRenderer} from "@web_widget_x2many_2d_matrix/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.esm";
-import {archParseBoolean} from "@web/views/utils";
+import {exprToBoolean} from "@web/core/utils/strings";
import {registry} from "@web/core/registry";
import {standardFieldProps} from "@web/views/fields/standard_field_props";
@@ -41,15 +39,15 @@ export const x2Many2DMatrixField = {
x: attrs.field_x_axis,
y: attrs.field_y_axis,
},
- isXClickable: archParseBoolean(attrs.x_axis_clickable),
- isYClickable: archParseBoolean(attrs.y_axis_clickable),
+ isXClickable: exprToBoolean(attrs.x_axis_clickable),
+ isYClickable: exprToBoolean(attrs.y_axis_clickable),
showRowTotals:
"show_row_totals" in attrs
- ? archParseBoolean(attrs.show_row_totals)
+ ? exprToBoolean(attrs.show_row_totals)
: true,
showColumnTotals:
"show_column_totals" in attrs
- ? archParseBoolean(attrs.show_column_totals)
+ ? exprToBoolean(attrs.show_column_totals)
: true,
};
},
diff --git a/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.esm.js b/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.esm.js
index 56cb698dd..0fdd4ca41 100644
--- a/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.esm.js
+++ b/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.esm.js
@@ -1,5 +1,3 @@
-/** @odoo-module **/
-
import {Component, onWillUpdateProps} from "@odoo/owl";
import {registry} from "@web/core/registry";
const fieldRegistry = registry.category("fields");
diff --git a/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.xml b/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.xml
index 562d565d2..102b8c9ad 100644
--- a/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.xml
+++ b/web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_renderer/x2many_2d_matrix_renderer.xml
@@ -25,11 +25,13 @@
-
+
+
+
|
|