Skip to content

Commit da76c01

Browse files
committed
[MIG] web_widget_x2many_2d_matrix: Migration to 18.0
1 parent 5619766 commit da76c01

File tree

4 files changed

+31
-28
lines changed

4 files changed

+31
-28
lines changed

web_widget_x2many_2d_matrix/README.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
20-
:target: https://github.com/OCA/web/tree/17.0/web_widget_x2many_2d_matrix
20+
:target: https://github.com/OCA/web/tree/18.0/web_widget_x2many_2d_matrix
2121
:alt: OCA/web
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_x2many_2d_matrix
23+
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_widget_x2many_2d_matrix
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -73,12 +73,12 @@ attributes:
7373
.. code:: xml
7474
7575
<field name="my_field" widget="x2many_2d_matrix" field_x_axis="my_field1" field_y_axis="my_field2" field_value="my_field3">
76-
<tree>
76+
<list>
7777
<field name="my_field"/>
7878
<field name="my_field1"/>
7979
<field name="my_field2"/>
8080
<field name="my_field3"/>
81-
</tree>
81+
</list>
8282
</field>
8383
8484
You can pass the following parameters:
@@ -142,12 +142,12 @@ Now in our wizard, we can use:
142142
.. code:: xml
143143
144144
<field name="task_ids" widget="x2many_2d_matrix" field_x_axis="project_id" field_y_axis="user_id" field_value="planned_hours">
145-
<tree>
145+
<list>
146146
<field name="task_ids"/>
147147
<field name="project_id"/>
148148
<field name="user_id"/>
149149
<field name="planned_hours"/>
150-
</tree>
150+
</list>
151151
</field>
152152
153153
Known issues / Roadmap
@@ -187,7 +187,7 @@ Bug Tracker
187187
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
188188
In case of trouble, please check there if your issue has already been reported.
189189
If you spotted it first, help us to smash it by providing a detailed and welcomed
190-
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_x2many_2d_matrix%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
190+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_x2many_2d_matrix%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
191191

192192
Do not contact contributors directly about support or help with technical issues.
193193

@@ -242,6 +242,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
242242

243243
|maintainer-ChrisOForgeFlow|
244244

245-
This module is part of the `OCA/web <https://github.com/OCA/web/tree/17.0/web_widget_x2many_2d_matrix>`_ project on GitHub.
245+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_widget_x2many_2d_matrix>`_ project on GitHub.
246246

247247
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

web_widget_x2many_2d_matrix/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
66
{
77
"name": "2D matrix for x2many fields",
8-
"version": "17.0.1.0.0",
8+
"version": "18.0.1.0.0",
99
"maintainers": ["ChrisOForgeFlow"],
1010
"development_status": "Production/Stable",
1111
"author": (

web_widget_x2many_2d_matrix/readme/USAGE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ attributes:
88

99
``` xml
1010
<field name="my_field" widget="x2many_2d_matrix" field_x_axis="my_field1" field_y_axis="my_field2" field_value="my_field3">
11-
<tree>
11+
<list>
1212
<field name="my_field"/>
1313
<field name="my_field1"/>
1414
<field name="my_field2"/>
1515
<field name="my_field3"/>
16-
</tree>
16+
</list>
1717
</field>
1818
```
1919

@@ -81,11 +81,11 @@ Now in our wizard, we can use:
8181

8282
``` xml
8383
<field name="task_ids" widget="x2many_2d_matrix" field_x_axis="project_id" field_y_axis="user_id" field_value="planned_hours">
84-
<tree>
84+
<list>
8585
<field name="task_ids"/>
8686
<field name="project_id"/>
8787
<field name="user_id"/>
8888
<field name="planned_hours"/>
89-
</tree>
89+
</list>
9090
</field>
9191
```

web_widget_x2many_2d_matrix/static/description/index.html

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
/*
1010
:Author: David Goodger (goodger@python.org)
11-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1212
:Copyright: This stylesheet has been placed in the public domain.
1313
1414
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1516
1617
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1718
customize this style sheet.
@@ -274,7 +275,7 @@
274275
margin-left: 2em ;
275276
margin-right: 2em }
276277

277-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
278279
pre.code, code { background-color: #eeeeee }
279280
pre.code .comment, code .comment { color: #5C6576 }
280281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
300301
span.pre {
301302
white-space: pre }
302303

303-
span.problematic {
304+
span.problematic, pre.problematic {
304305
color: red }
305306

306307
span.section-subtitle {
@@ -368,7 +369,7 @@ <h1 class="title">2D matrix for x2many fields</h1>
368369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369370
!! source digest: sha256:23139cf061fc7a4ccb3f53579ad76f2d4737df131199206e85d7a262a094a20d
370371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_widget_x2many_2d_matrix"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_x2many_2d_matrix"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_widget_x2many_2d_matrix"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_widget_x2many_2d_matrix"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372373
<p>This module allows to show an x2many field with 3-tuples ($x_value,
373374
$y_value, $value) in a table</p>
374375
<table border="1" class="docutils">
@@ -435,12 +436,12 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
435436
attributes:</p>
436437
<pre class="code xml literal-block">
437438
<span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;my_field&quot;</span><span class="w"> </span><span class="na">widget=</span><span class="s">&quot;x2many_2d_matrix&quot;</span><span class="w"> </span><span class="na">field_x_axis=</span><span class="s">&quot;my_field1&quot;</span><span class="w"> </span><span class="na">field_y_axis=</span><span class="s">&quot;my_field2&quot;</span><span class="w"> </span><span class="na">field_value=</span><span class="s">&quot;my_field3&quot;</span><span class="nt">&gt;</span><span class="w">
438-
</span><span class="nt">&lt;tree&gt;</span><span class="w">
439+
</span><span class="nt">&lt;list&gt;</span><span class="w">
439440
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;my_field&quot;</span><span class="nt">/&gt;</span><span class="w">
440441
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;my_field1&quot;</span><span class="nt">/&gt;</span><span class="w">
441442
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;my_field2&quot;</span><span class="nt">/&gt;</span><span class="w">
442443
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;my_field3&quot;</span><span class="nt">/&gt;</span><span class="w">
443-
</span><span class="nt">&lt;/tree&gt;</span><span class="w">
444+
</span><span class="nt">&lt;/list&gt;</span><span class="w">
444445
</span><span class="nt">&lt;/field&gt;</span>
445446
</pre>
446447
<p>You can pass the following parameters:</p>
@@ -459,12 +460,12 @@ <h2><a class="toc-backref" href="#toc-entry-2">Example</a></h2>
459460
<tt class="docutils literal">project.task</tt> as our data model and point to it from our wizard. The
460461
crucial part is that we fill the field in the default function:</p>
461462
<pre class="code python literal-block">
462-
<span class="kn">from</span> <span class="nn">odoo</span> <span class="kn">import</span> <span class="n">fields</span><span class="p">,</span> <span class="n">models</span><span class="w">
463+
<span class="kn">from</span><span class="w"> </span><span class="nn">odoo</span><span class="w"> </span><span class="kn">import</span> <span class="n">fields</span><span class="p">,</span> <span class="n">models</span><span class="w">
463464

464-
</span><span class="k">class</span> <span class="nc">MyWizard</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">TransientModel</span><span class="p">):</span><span class="w">
465+
</span><span class="k">class</span><span class="w"> </span><span class="nc">MyWizard</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">TransientModel</span><span class="p">):</span><span class="w">
465466
</span> <span class="n">_name</span> <span class="o">=</span> <span class="s1">'my.wizard'</span><span class="w">
466467

467-
</span> <span class="k">def</span> <span class="nf">_default_task_ids</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
468+
</span> <span class="k">def</span><span class="w"> </span><span class="nf">_default_task_ids</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
468469
</span> <span class="c1"># your list of project should come from the context, some selection</span><span class="w">
469470
</span> <span class="c1"># in a previous wizard or wherever else</span><span class="w">
470471
</span> <span class="n">projects</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="p">[</span><span class="s1">'project.project'</span><span class="p">]</span><span class="o">.</span><span class="n">browse</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span><span class="w">
@@ -493,12 +494,12 @@ <h2><a class="toc-backref" href="#toc-entry-2">Example</a></h2>
493494
<p>Now in our wizard, we can use:</p>
494495
<pre class="code xml literal-block">
495496
<span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;task_ids&quot;</span><span class="w"> </span><span class="na">widget=</span><span class="s">&quot;x2many_2d_matrix&quot;</span><span class="w"> </span><span class="na">field_x_axis=</span><span class="s">&quot;project_id&quot;</span><span class="w"> </span><span class="na">field_y_axis=</span><span class="s">&quot;user_id&quot;</span><span class="w"> </span><span class="na">field_value=</span><span class="s">&quot;planned_hours&quot;</span><span class="nt">&gt;</span><span class="w">
496-
</span><span class="nt">&lt;tree&gt;</span><span class="w">
497+
</span><span class="nt">&lt;list&gt;</span><span class="w">
497498
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;task_ids&quot;</span><span class="nt">/&gt;</span><span class="w">
498499
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;project_id&quot;</span><span class="nt">/&gt;</span><span class="w">
499500
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;user_id&quot;</span><span class="nt">/&gt;</span><span class="w">
500501
</span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;planned_hours&quot;</span><span class="nt">/&gt;</span><span class="w">
501-
</span><span class="nt">&lt;/tree&gt;</span><span class="w">
502+
</span><span class="nt">&lt;/list&gt;</span><span class="w">
502503
</span><span class="nt">&lt;/field&gt;</span>
503504
</pre>
504505
</div>
@@ -542,7 +543,7 @@ <h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
542543
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
543544
In case of trouble, please check there if your issue has already been reported.
544545
If you spotted it first, help us to smash it by providing a detailed and welcomed
545-
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_x2many_2d_matrix%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
546+
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_x2many_2d_matrix%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
546547
<p>Do not contact contributors directly about support or help with technical issues.</p>
547548
</div>
548549
<div class="section" id="credits">
@@ -579,13 +580,15 @@ <h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
579580
<div class="section" id="maintainers">
580581
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
581582
<p>This module is maintained by the OCA.</p>
582-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
583+
<a class="reference external image-reference" href="https://odoo-community.org">
584+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
585+
</a>
583586
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
584587
mission is to support the collaborative development of Odoo features and
585588
promote its widespread use.</p>
586589
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
587590
<p><a class="reference external image-reference" href="https://github.com/ChrisOForgeFlow"><img alt="ChrisOForgeFlow" src="https://github.com/ChrisOForgeFlow.png?size=40px" /></a></p>
588-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/17.0/web_widget_x2many_2d_matrix">OCA/web</a> project on GitHub.</p>
591+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/18.0/web_widget_x2many_2d_matrix">OCA/web</a> project on GitHub.</p>
589592
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
590593
</div>
591594
</div>

0 commit comments

Comments
 (0)