Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4378 Переглядів

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?

Аватар
Відмінити
Найкраща відповідь

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:

Link

Hope it will help you!

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
лип. 23
2278
3
лют. 20
16056
0
квіт. 24
1297
1
вер. 23
1321
1
лист. 21
16378