[IMP] cancel pending edition when hiding the list view, if editable

otherwise the edition disappears but part of the list view (e.g. buttons at the top) remain in the wrong state

bzr revid: xmo@openerp.com-20120904121823-kejzzquax2hdedoo
This commit is contained in:
Xavier Morel 2012-09-04 14:18:23 +02:00
parent b4b104e0d0
commit 1f1a0ef14b
1 changed files with 6 additions and 0 deletions

View File

@ -55,6 +55,12 @@ openerp.web.list_editable = function (instance) {
instance.web.bus.off('resize', this, this.resize_fields);
this._super();
},
do_hide: function () {
if (this.editor.is_editing()) {
this.cancel_edition(true);
}
this._super();
},
/**
* Handles the activation of a record in editable mode (making a record
* editable), called *after* the record has become editable.