diff --git a/web_widget_x2many_2d_matrix/README.rst b/web_widget_x2many_2d_matrix/README.rst index 05a455df1..370aab8c1 100644 --- a/web_widget_x2many_2d_matrix/README.rst +++ b/web_widget_x2many_2d_matrix/README.rst @@ -17,13 +17,13 @@ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github - :target: https://github.com/OCA/web/tree/17.0/web_widget_x2many_2d_matrix + :target: https://github.com/OCA/web/tree/18.0/web_widget_x2many_2d_matrix :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_x2many_2d_matrix + :target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_widget_x2many_2d_matrix :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -73,12 +73,12 @@ attributes: .. code:: xml - + - + You can pass the following parameters: @@ -142,12 +142,12 @@ Now in our wizard, we can use: .. code:: xml - + - + Known issues / Roadmap @@ -187,7 +187,7 @@ Bug Tracker 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. @@ -242,6 +242,6 @@ Current `maintainer `__: |maintainer-ChrisOForgeFlow| -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/__manifest__.py b/web_widget_x2many_2d_matrix/__manifest__.py index 4a8c40b57..525f18fd3 100644 --- a/web_widget_x2many_2d_matrix/__manifest__.py +++ b/web_widget_x2many_2d_matrix/__manifest__.py @@ -5,7 +5,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "2D matrix for x2many fields", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "maintainers": ["ChrisOForgeFlow"], "development_status": "Production/Stable", "author": ( diff --git a/web_widget_x2many_2d_matrix/readme/USAGE.md b/web_widget_x2many_2d_matrix/readme/USAGE.md index d85bd6fed..f73b8409a 100644 --- a/web_widget_x2many_2d_matrix/readme/USAGE.md +++ b/web_widget_x2many_2d_matrix/readme/USAGE.md @@ -8,12 +8,12 @@ attributes: ``` xml - + - + ``` @@ -81,11 +81,11 @@ Now in our wizard, we can use: ``` xml - + - + ``` diff --git a/web_widget_x2many_2d_matrix/static/description/index.html b/web_widget_x2many_2d_matrix/static/description/index.html index e377ba99b..eb876a578 100644 --- a/web_widget_x2many_2d_matrix/static/description/index.html +++ b/web_widget_x2many_2d_matrix/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.option { span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,7 +369,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:23139cf061fc7a4ccb3f53579ad76f2d4737df131199206e85d7a262a094a20d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

Production/Stable License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

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

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

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:

ChrisOForgeFlow

-

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