Field / button 'attrs' not evaluated correctly with multiple conditions [FIX PROVIDED]
Bug #718925 reported by
Russell Briggs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web Client |
New
|
Undecided
|
OpenERP Publisher's Warranty Team |
Bug Description
I have the following button in my form:
<button name="button_
attrs=
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.
Changed in openobject-client-web: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
status: | Invalid → New |
tags: | added: maintenance |
To post a comment you must log in.
I have tested your patch with a many2one filed:
<field name="prodlot_id" "[('product_ id','=' ,product_ id),('stock_ available' ,'>' ,0)]" {'invisible' : prodlot_ id','< >',False) ,('tracking' ,'=',False) ]}"/>
domain=
attrs="
['|',('
Did not work.
Pe 14.02.2011 20:52, Russell Briggs a scris: eval.patch" /bugs.launchpad .net/bugs/ 718925/ +attachment/ 1849826/ +files/ fix_attrs_ eval.patch
> ** Patch added: "fix_attrs_
> https:/
>