Skip to content
Snippets Groups Projects
Commit ee73f6a0 authored by Rémi Rahir's avatar Rémi Rahir
Browse files

[FIX] iap: fix charge helper

InsufficientCreditError was not properly raised, thus not caught by the JS.
parent 087bebf8
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@ def charge(env, key, account_token, credit, description=None, credit_template=No
arguments = json.loads(e.args[0])
arguments['body'] = env['ir.qweb'].render(credit_template)
e.args = (json.dumps(arguments),)
raise e
try:
yield
except Exception as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment