Skip to content

Commit ed04bed

Browse files
committed
[MIG] sql_request_abstract: Migration to 18.0
1 parent 0cd6828 commit ed04bed

File tree

7 files changed

+25
-12
lines changed

7 files changed

+25
-12
lines changed

sql_request_abstract/README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ Contributors
124124
- Alfadil Tabar (alfadil.tabar@gmail.com)
125125
- Helly kapatel <helly.kapatel@initos.com>
126126
- Nguyen Minh Chien <chien@trobz.com>
127+
- Vo Hong Thien <thienvh@trobz.com>
128+
129+
Other credits
130+
-------------
131+
132+
The migration of this module from 17.0 to 18.0 was financially supported
133+
by Camptocamp.
127134
128135
Maintainers
129136
-----------

sql_request_abstract/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "SQL Request Abstract",
7-
"version": "17.0.1.0.1",
7+
"version": "18.0.1.0.0",
88
"author": "GRAP,Akretion,Odoo Community Association (OCA)",
99
"maintainers": ["legalsylvain"],
1010
"website": "https://github.com/OCA/reporting-engine",

sql_request_abstract/models/sql_request_mixin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def check_external_config(self):
114114
raise ValidationError(
115115
_(
116116
"You can't use an external database as there are no such "
117-
"configuration about this. Please contact your Odoo administrator"
118-
" to solve this issue."
117+
"configuration about this. Please contact "
118+
"your Odoo administrator to solve this issue."
119119
)
120120
)
121121

@@ -260,14 +260,14 @@ def _get_cr_for_query(self):
260260
def _create_savepoint(self, cr):
261261
rollback_name = "{}_{}".format(self._name.replace(".", "_"), uuid.uuid1().hex)
262262
# pylint: disable=sql-injection
263-
req = "SAVEPOINT %s" % (rollback_name)
263+
req = f"SAVEPOINT {rollback_name}"
264264
cr.execute(req)
265265
return rollback_name
266266

267267
@api.model
268268
def _rollback_savepoint(self, rollback_name, cr):
269269
# pylint: disable=sql-injection
270-
req = "ROLLBACK TO SAVEPOINT %s" % (rollback_name)
270+
req = f"ROLLBACK TO SAVEPOINT {rollback_name}"
271271
cr.execute(req)
272272
# close external database cursor
273273
if self.env.cr != cr:
@@ -300,7 +300,7 @@ def _check_prohibited_words(self):
300300
self.ensure_one()
301301
query = self.query.lower()
302302
for word in self.PROHIBITED_WORDS:
303-
expr = r"\b%s\b" % word
303+
expr = rf"\b{word}\b"
304304
is_not_safe = re.search(expr, query)
305305
if is_not_safe:
306306
raise UserError(

sql_request_abstract/readme/CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
- Alfadil Tabar (<[email protected]>)
44
- Helly kapatel \<<[email protected]>\>
55
- Nguyen Minh Chien \<<[email protected]>\>
6+
- Vo Hong Thien \<<[email protected]>\>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The migration of this module from 17.0 to 18.0 was financially supported by Camptocamp.

sql_request_abstract/static/description/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,14 @@ <h1>Contributors</h1>
464464
<li>Alfadil Tabar (<a class="reference external" href="mailto:alfadil.tabar&#64;gmail.com">alfadil.tabar&#64;gmail.com</a>)</li>
465465
<li>Helly kapatel &lt;<a class="reference external" href="mailto:helly.kapatel&#64;initos.com">helly.kapatel&#64;initos.com</a>&gt;</li>
466466
<li>Nguyen Minh Chien &lt;<a class="reference external" href="mailto:chien&#64;trobz.com">chien&#64;trobz.com</a>&gt;</li>
467+
<li>Vo Hong Thien &lt;<a class="reference external" href="mailto:thienvh&#64;trobz.com">thienvh&#64;trobz.com</a>&gt;</li>
467468
</ul>
468469
</div>
470+
<div class="section" id="other-credits">
471+
<h1>Other credits</h1>
472+
<p>The migration of this module from 17.0 to 18.0 was financially supported
473+
by Camptocamp.</p>
474+
</div>
469475
<div class="section" id="maintainers">
470476
<h1>Maintainers</h1>
471477
<p>This module is maintained by the OCA.</p>

sql_request_abstract/views/view_sql_request_mixin.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
99
<record id="view_sql_request_mixin_tree" model="ir.ui.view">
1010
<field name="model">sql.request.mixin</field>
1111
<field name="arch" type="xml">
12-
<tree
12+
<list
1313
decoration-info="state=='draft'"
1414
decoration-warning="state in ('sql_valid', 'model_valid')"
1515
>
1616
<field name="name" />
1717
<field name="state" />
18-
</tree>
18+
</list>
1919
</field>
2020
</record>
2121

@@ -96,10 +96,8 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
9696
</page>
9797
</notebook>
9898
</sheet>
99-
<div class="oe_chatter">
100-
<field name="message_follower_ids" />
101-
<field name="message_ids" />
102-
</div>
99+
<!-- Chatter -->
100+
<chatter />
103101
</form>
104102

105103
</field>

0 commit comments

Comments
 (0)