I have a module with 3 fields:
name = fields.Char(...)
description = fields.Char(...)
forbridden_user = fields.Many2one('res.user',...)
When I create a record in field forbridden_user I select user which I want prevent from editing field description. How could I achieve that? I tried doing the fallowing:
<field name="description" attrs="{'readonly': [('forbidden_user', '=', 'uid')]}"/>
But it doesn't work.
<field name="description" attrs="{'readonly': [('forbidden_user', '=', uid)]}"/>
Causes error:
Error details: "name 'uid' is not defined" while evaluating