You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
523 B

# Copyright 2021 Quartile Limited
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import api, fields, models
class ResUsers(models.Model):
_inherit = "res.users"
unrestrict_model_update = fields.Boolean(
"Unrestrict Model Update",
help="Set to true and the user can update restricted model.",
)
@api.multi
def toggle_unrestrict_model_update(self):
for record in self:
record.unrestrict_model_update = not record.unrestrict_model_update