Comment 7 for bug 1066703

Revision history for this message
Yann Papouin (yann-papouin) wrote :

=== modified file addons/web/static/src/js/view_list_editable.js
--- addons/web/static/src/js/view_list_editable.js 2012-06-15 05:54:40 +0000
+++ addons/web/static/src/js/view_list_editable.js 2013-01-23 08:39:53 +0000
@@ -136,9 +136,15 @@
             }
             cancelled.then(function () {
                 self.view.unpad_columns();
- self.edition_form.stop();
- self.edition_form.$element.remove();
- delete self.edition_form;
+ if(typeof self.edition_form != 'undefined')
+ {
+ // Fix for bug #1066703: self.edition_form is undefined when switching from a line to another
+ if(self.edition_form){
+ self.edition_form.stop();
+ self.edition_form.$element.remove();
+ delete self.edition_form;
+ }
+ }
                 self.dataset.index = null;
                 delete self.edition_id;
                 delete self.edition;