c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #16098
[Bug 718925] [NEW] [6.0.1] Field / button 'attrs' not evaluated correctly with multiple conditions [FIX PROVIDED]
Public bug reported:
I have the following button in my form:
<button name="button_completed" string="Completed" type="object" icon="gtk-index"
attrs="{'invisible':['|',('order_type','not in',['sample','stock']),('state','!=','new')]}" />
The attrs is designed to show the button only for orders of type
'sample' and 'stock', with a status of 'new', however only the first
part of the condition (order_type) was being evaluated correctly.
I tracked this down to a tiny javascript error in 'form_evalExpr'
function in form_state.js. As it loops through each condition, it does
not reset the value of 'elem' to null, so it simply reuses the first
element for each of the subsequent evaluations.
Fix attached.
** Affects: openobject-client-web
Importance: Undecided
Status: New
--
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/718925
Title:
[6.0.1] Field / button 'attrs' not evaluated correctly with multiple
conditions [FIX PROVIDED]
Status in OpenERP Web Client:
New
Bug description:
I have the following button in my form:
<button name="button_completed" string="Completed" type="object" icon="gtk-index"
attrs="{'invisible':['|',('order_type','not in',['sample','stock']),('state','!=','new')]}" />
The attrs is designed to show the button only for orders of type
'sample' and 'stock', with a status of 'new', however only the first
part of the condition (order_type) was being evaluated correctly.
I tracked this down to a tiny javascript error in 'form_evalExpr'
function in form_state.js. As it loops through each condition, it does
not reset the value of 'elem' to null, so it simply reuses the first
element for each of the subsequent evaluations.
Fix attached.
Follow ups
References