I want to make certain column fields in Notebook->table widget editable for certain users and readonly for other users.how can i do that?can anyone help me to fix it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
4322
查看
Hi,use attrs for the field in XML: defined create_uid in .py:
'create_uid': fields.many2one('res.users', 'Author', select=True, readonly=True),
the doc for create_uid link
- create_uid: user who created the record
- create_date: date when the record was created
- write_uid: last user who changed the record
- write_date: date of the last change to the record
Then in XML:
<field name="xxx" string=xxx" attrs="{'readonly':[('create_uid','!=',uid)]}"/>
But that the uid is currently not supported in the attrs attribute:
https://bugs.launchpad.net/openobject-server/+bug/920033
more details you may refer to:
Hope it will help you!
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
2
7月 23
|
2211 | ||
|
3
2月 20
|
16030 | ||
|
0
4月 24
|
1254 | ||
|
1
9月 23
|
1260 | ||
|
1
11月 21
|
16346 |