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

Bug #1066703 reported by Guewen Baconnier @ Camptocamp
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)
New
Undecided
Unassigned
6.1
Fix Committed
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

Tags: maintenance

Related branches

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :
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
Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

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
Revision history for this message
Kyle Waid (midwest) wrote :

Hello,

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

Revision history for this message
Antoine André (antoine-andre1986) wrote :

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

Revision history for this message
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.

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

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

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

}

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;

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.