CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
You want the field to be Readonly, but trying to add value through Onchange or so, then you need to under-go hassle of updating for the same again in the Create/Write ORM methods.
Instead the feasible alternate solution would be you to use Compute/functional fields.
Api decorator lets you add depends(dependency) field, which acts as both onchange and computational method, that way you don't have to worry about manually re-updating the same in ORM methods.
If a field is marked as Readonly, odoo will explicitly omit retrieving data for the same from UI, hence in such case its best to use computational/related fields.
About This Community
Odoo Training Center
|Asked: 10/26/16, 3:52 AM|
|Seen: 438 times|
|Last updated: 10/27/16, 2:05 AM|