From a39e1903151e5283fae1acf1f424c048ecd7229b Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Fri, 13 Nov 2015 15:32:29 +0100 Subject: [PATCH] [IMP][reset_user_access_right] Use @api.multi instead of @api.one --- reset_user_access_right/models/res_users.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reset_user_access_right/models/res_users.py b/reset_user_access_right/models/res_users.py index 0cbb1f5fb..99d87a3af 100644 --- a/reset_user_access_right/models/res_users.py +++ b/reset_user_access_right/models/res_users.py @@ -30,8 +30,9 @@ from openerp.tools import SUPERUSER_ID class ResUsers(models.Model): _inherit = 'res.users' - @api.one + @api.multi def reset_access_right(self): + self.ensure_one() if self.id == SUPERUSER_ID: raise exceptions.Warning(_("It's not possible to reset " "access right for Admin"))