Merge lp:~openerp-dev/openobject-client-web/5.0-opw-576064-msh into lp:openobject-client-web/5.0

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-client-web/5.0-opw-576064-msh
Merge into: lp:openobject-client-web/5.0
Diff against target: 22 lines (+5/-7)
1 file modified
openerp/static/javascript/listgrid.js (+5/-7)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/5.0-opw-576064-msh
Reviewer Review Type Date Requested Status
OpenERP R&D Web Team Pending
Review via email: mp+112000@code.launchpad.net

Description of the change

Hello,

Fixed the issue of many2one widget which not works in editable tree view mode inside one2many in firefox > 4.

The reason is we are calling listgrid/get method which will return final response as html and we are setting it in innerHtml of DIV, but assigning an HTML will not execute scripts, we have already created a code to execute the script but it is executed based on condition, assigning a final HTML will not going to execute script in any browser hence removed the condition.

Demo :- Open any view in which there is editable tree view inside one2many or either make pricelist item tree view editable to check the issue, open web-client 5.0 in firefox > 4, the many2one search and open resource will not work.

Thanks.

To post a comment you must log in.

Unmerged revisions

2959. By Mohammed Shekha(Open ERP)

[FIX]Fixed the issue of many2one search popup not opened because got the final html code from listgrid/get and put it using innerHtml which will execute scripts, actually it is due to condtion.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openerp/static/javascript/listgrid.js'
--- openerp/static/javascript/listgrid.js 2010-08-03 11:28:47 +0000
+++ openerp/static/javascript/listgrid.js 2012-06-26 04:20:55 +0000
@@ -549,13 +549,11 @@
549549
550 var ua = navigator.userAgent.toLowerCase();550 var ua = navigator.userAgent.toLowerCase();
551551
552 if ((navigator.appName != 'Netscape') || (ua.indexOf('safari') != -1)) {552 // execute JavaScript
553 // execute JavaScript553 var scripts = getElementsByTagAndClassName('script', null, newlist);
554 var scripts = getElementsByTagAndClassName('script', null, newlist);554 forEach(scripts, function(s){
555 forEach(scripts, function(s){555 eval(s.innerHTML);
556 eval(s.innerHTML);556 });
557 });
558 }
559 557
560 // update concurrency info558 // update concurrency info
561 for(var key in obj.info) {559 for(var key in obj.info) {