Browse Source

[IMP][reset_user_access_right] Use @api.multi instead of @api.one

pull/267/head
Adrien Peiffer (ACSONE) 9 years ago
parent
commit
a39e190315
  1. 3
      reset_user_access_right/models/res_users.py

3
reset_user_access_right/models/res_users.py

@ -30,8 +30,9 @@ from openerp.tools import SUPERUSER_ID
class ResUsers(models.Model): class ResUsers(models.Model):
_inherit = 'res.users' _inherit = 'res.users'
@api.one
@api.multi
def reset_access_right(self): def reset_access_right(self):
self.ensure_one()
if self.id == SUPERUSER_ID: if self.id == SUPERUSER_ID:
raise exceptions.Warning(_("It's not possible to reset " raise exceptions.Warning(_("It's not possible to reset "
"access right for Admin")) "access right for Admin"))

Loading…
Cancel
Save