Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
lmignon committed May 3, 2020
1 parent ea0654c commit f9c0d74
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions click_odoo_contrib/_dbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ def reset_config_parameters(dbname):
(dbuuid, ...)
"""
with OdooEnvironment(dbname) as env:
try:
env["ir.config_parameter"].init(force=True)
except TypeError:
# odoo < 10
if odoo.release.version_info < (10, 0):
env.registry("ir.config_parameter").init(env.cr, force=True)
else:
env["ir.config_parameter"].init(force=True)

0 comments on commit f9c0d74

Please sign in to comment.