odooodoo-8access-rules

Shall I record the user name who modify a certain field by Odoo?


.py file: ….

namex=fields.Text()

moifier=fields.Many2one(‘res.users’, string=”Modifier”)

When some user modify “namex”, his/her name should be recorded on field “modifier” automatically; what code should I make? I try “onchange/depends”, but failed; maybe modifier could be a “text field/ char field”?

in addition, shall I set "access_rule" to set users just see the records created by the members in his/her own group?


Solution

  • Odoo already has that for you. Every model has those fields, which are automatically created and updated each time you create, or write:

    Go to Settings > Technical > Database Structure > Models for more details.