Skip to content

Commit 4bc9e2c

Browse files
[MIG] report_qweb_field_option: Migration to 19.0
1 parent 6580a9f commit 4bc9e2c

6 files changed

Lines changed: 31 additions & 27 deletions

File tree

report_qweb_field_option/README.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Report Qweb Field Option
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
24-
:target: https://github.com/OCA/reporting-engine/tree/18.0/report_qweb_field_option
24+
:target: https://github.com/OCA/reporting-engine/tree/19.0/report_qweb_field_option
2525
:alt: OCA/reporting-engine
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_qweb_field_option
27+
:target: https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_qweb_field_option
2828
:alt: Translate me on Weblate
2929
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,15 +49,15 @@ create records according to your needs.
4949

5050
For each record:
5151

52-
- Set **Model** and **Field** (required)
53-
- Set **UoM** and **UoM Field**, or **Currency** and **Currency Field**
54-
only for fields of float type (optional)
55-
- Set **Company** (optional)
56-
- Set **Options** as a string representation of a dictionary. E.g.,
57-
``{"widget": "date"}``, ``{"widget": "monetary"}``, or
58-
``{"widget": "contact", "fields": ["name", "phone"]}``
59-
- Set **Digits** (only for float-type fields). The value is ignored if
60-
Options is set
52+
- Set **Model** and **Field** (required)
53+
- Set **UoM** and **UoM Field**, or **Currency** and **Currency Field**
54+
only for fields of float type (optional)
55+
- Set **Company** (optional)
56+
- Set **Options** as a string representation of a dictionary. E.g.,
57+
``{"widget": "date"}``, ``{"widget": "monetary"}``, or
58+
``{"widget": "contact", "fields": ["name", "phone"]}``
59+
- Set **Digits** (only for float-type fields). The value is ignored if
60+
Options is set
6161

6262
Usage
6363
=====
@@ -100,7 +100,7 @@ Bug Tracker
100100
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
101101
In case of trouble, please check there if your issue has already been reported.
102102
If you spotted it first, help us to smash it by providing a detailed and welcomed
103-
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_field_option%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
103+
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_field_option%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
104104

105105
Do not contact contributors directly about support or help with technical issues.
106106

@@ -115,10 +115,10 @@ Authors
115115
Contributors
116116
------------
117117

118-
- `Quartile <https://www.quartile.co>`__:
118+
- `Quartile <https://www.quartile.co>`__:
119119

120-
- Yoshi Tashiro
121-
- Aung Ko Ko Lin
120+
- Yoshi Tashiro
121+
- Aung Ko Ko Lin
122122

123123
Maintainers
124124
-----------
@@ -133,6 +133,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
133133
mission is to support the collaborative development of Odoo features and
134134
promote its widespread use.
135135

136-
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/18.0/report_qweb_field_option>`_ project on GitHub.
136+
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/19.0/report_qweb_field_option>`_ project on GitHub.
137137

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

report_qweb_field_option/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33
{
44
"name": "Report Qweb Field Option",
5-
"version": "18.0.1.0.1",
5+
"version": "19.0.1.0.0",
66
"category": "Technical Settings",
77
"license": "AGPL-3",
88
"author": "Quartile, Odoo Community Association (OCA)",

report_qweb_field_option/models/qweb_field_options.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import ast
55
import logging
66

7-
from odoo import _, api, fields, models
7+
from odoo import api, fields, models
88
from odoo.exceptions import ValidationError
99

1010
_logger = logging.getLogger(__name__)
@@ -63,15 +63,18 @@ def _check_field_options_format(self):
6363
field_options = ast.literal_eval(rec.field_options)
6464
except Exception as e:
6565
raise ValidationError(
66-
_(
66+
self.env._(
6767
"Invalid string for the Options field: %(field_options)s.\n"
68-
"Error: %(error)s"
68+
"Error: %(error)s",
69+
field_options=rec.field_options,
70+
error=e,
6971
)
70-
% {"field_options": rec.field_options, "error": e}
7172
) from e
7273
if not isinstance(field_options, dict):
7374
raise ValidationError(
74-
_("Options must be a dictionary, but got %s") % type(field_options)
75+
self.env._(
76+
"Options must be a dictionary, but got %s", type(field_options)
77+
)
7578
)
7679

7780
def _get_score(self, record):

report_qweb_field_option/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Report Qweb Field Option</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:6a839e0b8361541500cea7946ac9d7bfbcbe37ab2a102576061a2940c4343c5c
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/18.0/report_qweb_field_option"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_qweb_field_option"><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/reporting-engine&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/19.0/report_qweb_field_option"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_qweb_field_option"><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/reporting-engine&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>This module allows administrators to define the decimal precision of
379379
float fields and add option values to fields (e.g., adding a date widget
380380
option to datetime fields) for QWeb report and view presentation.</p>
@@ -445,7 +445,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
445445
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
446446
In case of trouble, please check there if your issue has already been reported.
447447
If you spotted it first, help us to smash it by providing a detailed and welcomed
448-
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_field_option%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
448+
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_field_option%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
449449
<p>Do not contact contributors directly about support or help with technical issues.</p>
450450
</div>
451451
<div class="section" id="credits">
@@ -475,7 +475,7 @@ <h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
475475
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
476476
mission is to support the collaborative development of Odoo features and
477477
promote its widespread use.</p>
478-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/18.0/report_qweb_field_option">OCA/reporting-engine</a> project on GitHub.</p>
478+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/19.0/report_qweb_field_option">OCA/reporting-engine</a> project on GitHub.</p>
479479
<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>
480480
</div>
481481
</div>

report_qweb_field_option/views/qweb_field_options_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<field name="currency_id" />
4949
<field name="company_id" />
5050
<separator />
51-
<group expand="1" string="Group By">
51+
<group>
5252
<filter
5353
string="Model"
5454
name="res_model_id"

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
odoo-test-helper

0 commit comments

Comments
 (0)