[6.1/firefox] Editable list: self.edition_form is undefined when switching from a line to another

Bug #1066703 reported by Guewen Baconnier @ Camptocamp on 2012-10-15
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Committed
Undecided
OpenERP Publisher's Warranty Team
OpenERP Community Backports (Web)
Undecided
Unassigned
6.1
Low
Stefan Rijnhart (Opener)

Bug Description

Hi,

Using Firefox 16.01 (last stable version) with OpenERP 6.1, on runbot.

On an editable list view, when we switch from a line to another, sometimes happens a "self.edition_form is undefined" exception.
It also happens that a line entirely disappear.

I couldn't reproduce it on chrome, but it is easily reproducible on Firefox (seems to happen more often when we change rapidly from a line to another.

I'll attach a screencast.

Have a nice day

Guewen

Related branches

summary: - [6.1/firefox] Editable list: self.edition_form is undefined when switch
- from a line to another
+ [6.1/firefox] Editable list: self.edition_form is undefined when
+ switching from a line to another
Changed in openerp-web:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openerp-web:
status: New → In Progress

Hello,

The fix has been landed in lp:~openerp-dev/openerp-web/6.1-opw-580541-msh.

Thanks.

Changed in openerp-web:
status: In Progress → Fix Committed
Kyle Waid (midwest) wrote :

Hello,

I have tested this fix. I still have the same issue

I confirm that i still have this issue too...

Yann Papouin (yann-papouin) wrote :

Really easy to reproduce on every editable tree where you can switch from list to form:

- Start to edit one line
- Click on the "Form" button
==> Uncaught TypeError: Cannot call method 'stop' of undefined

On latest 6.1 stable branch, with Firefox 18 and Chrome 24

But actually the proposed fix is at least fixing this case. So maybe more occurrence of this bug exists.

Yann Papouin (yann-papouin) wrote :

I've just added a check before to avoid this window to popup:

if (typeof self.edition_form != 'undefined') {

}

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;

Thank you Yann Papouin for the patch, I am proposing it to ocb-web/6.1

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments