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
1=== modified file 'openerp/static/javascript/listgrid.js'
2--- openerp/static/javascript/listgrid.js 2010-08-03 11:28:47 +0000
3+++ openerp/static/javascript/listgrid.js 2012-06-26 04:20:55 +0000
4@@ -549,13 +549,11 @@
5
6 var ua = navigator.userAgent.toLowerCase();
7
8- if ((navigator.appName != 'Netscape') || (ua.indexOf('safari') != -1)) {
9- // execute JavaScript
10- var scripts = getElementsByTagAndClassName('script', null, newlist);
11- forEach(scripts, function(s){
12- eval(s.innerHTML);
13- });
14- }
15+ // execute JavaScript
16+ var scripts = getElementsByTagAndClassName('script', null, newlist);
17+ forEach(scripts, function(s){
18+ eval(s.innerHTML);
19+ });
20
21 // update concurrency info
22 for(var key in obj.info) {