[FIX] close dialog on cancel form.

lp bug: https://launchpad.net/bugs/905375 fixed

bzr revid: vda@tinyerp.com-20111219161342-cjgv1v97gy3e7qnb
This commit is contained in:
Vaibhav (OpenERP) 2011-12-19 21:43:42 +05:30
parent 75409e349a
commit fedb878b0b
1 changed files with 5 additions and 0 deletions

View File

@ -423,6 +423,11 @@ openerp.web_calendar.CalendarFormDialog = openerp.web.Dialog.extend({
this.form.appendTo(this.$element);
this.form.on_created.add_last(this.on_form_dialog_saved);
this.form.on_saved.add_last(this.on_form_dialog_saved);
var self = this;
this.form.on_button_cancel.add_last(function() {
self.close();
});
},
on_form_dialog_saved: function() {
var id = this.dataset.ids[this.dataset.index];