OpenERP can not save the readonly field in sale order
This bug report was converted into a question: question #177080: OpenERP can not save the readonly field in sale order.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fleet manager |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Salam ,
In a sale order line, I try to make price_unit readonly for certain group , so to do this :
1- I created 2 groups : Sales / Readonly price unit & Sales / Write price unit
2- I used fields_get to redfine rights access like this :
if group.name == 'Sales / Readonly price unit':
Everything works fine except that by recording the sale order the unit price is set by default to 0.00 for users who have the readonly group.
Thanks for your help
Changed in fleetmanager: | |
status: | New → Invalid |
if group.name == 'Sales / Readonly price unit':
res[ field]. setdefault( 'states' , {})
res[ field][ 'states' ]['draft' ] = [('readonly', True)]