How to make field readonly based on group and status?

前端 未结 5 1289
故里飘歌
故里飘歌 2020-12-14 20:26

I want to make field readony based on group, and status.

Like i have two grops 1. Manager Group 2. User Group

If I give User Group to any <

5条回答
  •  春和景丽
    2020-12-14 20:54

    In case if you are using Odoo web client(GUI) instead of code then there is a bit unorthodox way to do it. Just make a copy of the field which will contain same value as the original one(giving original field name in Related Field under Advanced Properties) and mark it as read-only.

    Then you can hide original field from the users which cannot edit that field and hide the copy field from those who can edit by using groups attribute.

提交回复
热议问题