跳至内容
菜单
此问题已终结
1 回复
7802 查看

Is it possible to set read only access at fields level? For example in project.task object, I want users to be able to be able to edit some parts of it, but other parts not. Like for example they can see tags in task, but can't change it. Although they can change stage of task.

So if I make project.task object read only, then users won't be able to change anything. I didn't see option to add groups in specific fields, only to those fields objects (models).

Is it possible somehow to do this?

形象
丢弃
最佳答案

If you want to set readonly to fields there are some ways:

In the client:

  1. activate debug mode
  2. open "manage views" from the new Dropdown on top
  3. choose active view and push "Edit" on bottom
  4. find your field and edit it
  5. activate "readonly"

In the view (when writing addons):

<field name="FIELDNAME" readonly="1">

or maybe not static:

<field name="FIELDNAME" attrs={(any condition)}

view: https://accounts.openerp.com/forum/Help-1/question/13042

In the model:

_columns={
    'fieldname': fields.[any](string="", readonly=True)
}
形象
丢弃
编写者

But doing this it will make readonly for every user I suppose. I only want to make it readonly for users that belongs in particular group.

So take a look to the link. There is a possibility to make it readonly / invisible for specific groups / conditions. If you don't get it, come back to me and I'll give you an example here again.

相关帖文 回复 查看 活动
0
3月 24
3234
2
5月 20
6270
2
12月 23
9928
3
10月 16
6911
1
3月 15
7207