diff --git a/sql_request_abstract/__openerp__.py b/sql_request_abstract/__openerp__.py index f909dcc3c..7cdcb8d42 100644 --- a/sql_request_abstract/__openerp__.py +++ b/sql_request_abstract/__openerp__.py @@ -5,7 +5,7 @@ { 'name': 'SQL Request Abstract', - 'version': '8.0.1.0.0', + 'version': '8.0.1.0.1', 'author': 'GRAP,Akretion,Odoo Community Association (OCA)', 'website': 'https://www.odoo-community.org', 'license': 'AGPL-3', diff --git a/sql_request_abstract/models/sql_request_mixin.py b/sql_request_abstract/models/sql_request_mixin.py index d7df1f85c..665daed89 100644 --- a/sql_request_abstract/models/sql_request_mixin.py +++ b/sql_request_abstract/models/sql_request_mixin.py @@ -144,8 +144,10 @@ class SQLRequestMixin(models.AbstractModel): if mode in ('view', 'materialized_view'): rollback = False - params = params and params or {} - query = self.env.cr.mogrify(self.query, params).decode('utf-8') + params = params or {} + # pylint: disable=sql-injection + query = self.query % params + query = query.decode('utf-8') if mode in ('fetchone', 'fetchall'): pass