Community mailing list archives

community@mail.odoo.com

Re: WRITE TO ONCHANGE READONLY FIELD

by
dom
- 10/13/2016 10:09:04
A way to do, would be to have two different views, one for the group "salesman - see all" and one for the group "sale manager".

- On the first view, make the field invisible or class="oe_readonly" (or something like this ... it will make the field visible when viewing the form, but invisible when editing the form)

- On the second view, leave the field as normal

Cheers,

Dominique KON-SUN-TACK  [Project Manager]
Odoo Gold Partner, best Odoo Partner 2014 for APAC

Mobile: + 65 8502 2399
Skype: dominique_elico

On 13 October 2016 at 21:12, Peter Mudoko <petypi@gmail.com> wrote:

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}">

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe