c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #14904
[Bug 709409] Re: [trunk 4481] error on evaluate attrs in web-client
Hello,
Thanks for reporting.
** Changed in: openobject-client-web
Importance: Undecided => Low
** Changed in: openobject-client-web
Status: New => Confirmed
** Changed in: openobject-client-web
Assignee: (unassigned) => OpenERP SA's Web Client R&D (openerp-dev-web)
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/709409
Title:
[trunk 4481] error on evaluate attrs in web-client
Status in OpenERP Web Client:
In Progress
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
References