mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] rename controller
[IMP] launch openerp.web.Dialog instead of an alert()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user