Community mailing list archives

community@mail.odoo.com

WRITE TO ONCHANGE READONLY FIELD

by
mudoko
- 10/13/2016 09:07:46

Hi guys i want to restrict editing unit price on a sales order form to some groups since its an onchange method i cant set readonly attribute for groups ...i have even tried web_readonly_bypass addon its not working. any hint how this works or any other suggestion this is what i did.

<field name="order_line" mode="tree,kanban" attrs="{'readonly': [('state', 'in', ('done','cancel'))]} context="{'readonly_by_pass': True}">