** Branch linked: lp:openobject-client-web
--
You received this bug notification because you are a member of OpenERP
SA's Web Client R&D, which is a bug assignee.
https://bugs.launchpad.net/bugs/709409
Title:
[trunk 4481] error on evaluate attrs in web-client
Status in OpenERP Web Client:
Fix Released
Bug description:
To reproduce the problem, create a view with that in
<field string="First mode" name="contact_setting1" readonly="1"/>
<field string="Secondary mode" name="contact_setting2" readonly="1" />
<group string="Phone" attrs="{'invisible':[('contact_setting1', '!=',
'1'),('contact_setting2', '!=', '1')]}">
Problem come from : addons/openerp/static/javascript/form_state.js
function form_evalExpr(prefix, expr, ref_elem) {
var stack = [];
for (var i = 0; i < expr.length; i++) {
var ex = expr[i];
var elem; <===== where 2 condiction on the list, elem need to be
reset to null between each
if (ref_elem.parents('table.grid').length) {
var parent = ref_elem.parents('tr.grid-row');
elem = parent.find(idSelector(prefix + ex[0]));
}
if (!elem || !elem.length) { <====== If cant find elem on the
previous if for the second contidition, then second condition
elem = jQuery(idSelector(prefix + ex[0])); <==========
use the elem of the fist condition
}
Patch
change
var elem;
by
var elem = null;
I hope i'm clear
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help : https://help.launchpad.net/ListHelp