[Fix]Improve code

bzr revid: vja@tinyerp.com-20121008093315-tnfnrr0rhum2yyoy
This commit is contained in:
Vishmita 2012-10-08 15:03:15 +05:30
parent 6b30915df2
commit 777243bef3
1 changed files with 3 additions and 1 deletions

View File

@ -1014,7 +1014,9 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({
var action_manager = new instance.web.ActionManager(self);
$.when(action_manager.do_action(action)).then(function() {
var controller = action_manager.dialog_widget.views['form'].controller;
controller.on("on_button_cancel",self,action_manager.destroy);
controller.on("on_button_cancel",self,function(){
action_manager.destroy();
});
controller.do_save.add_last(function(){
action_manager.destroy();
var value =controller.fields.name.get('value');