[FIX] rename controller

[IMP] launch openerp.web.Dialog instead of an alert()
This commit is contained in:
Damien Crier
2015-06-08 10:58:59 +02:00
parent a5dfee75b6
commit 239cc13fff
3 changed files with 27 additions and 22 deletions

View File

@@ -23,7 +23,7 @@ import openerp
class WarningOnSaveController(openerp.addons.web.http.Controller):
_cp_path = "/web/warning_on_save"
_cp_path = "/web_warning_on_save"
@openerp.addons.web.http.jsonrequest
def check_warning_on_save(self, req, model, id):
@@ -32,8 +32,8 @@ class WarningOnSaveController(openerp.addons.web.http.Controller):
if method does not exist in the model, do nothing
"""
m = req.session.model(model)
try:
if hasattr(m, 'check_warning_on_save'):
return getattr(m, 'check_warning_on_save')(id, req.context)
except:
else:
return False