I have been experiencing different issues with the number of arguments passed to a computed field and I´m confused on how this works, was hoping if someone could give me some guidance on how to troubleshoot the following error and explain when to use the different labels of @api.depends and @api.multi
Error:
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
TypeError: get_user() takes exactly 1 argument (7 given)
Code:
'make_visible':fields.function(get_user, string="User Visible", type="boolean"),
@api.depends('make_visible')
def get_user(self, ):
user_crnt = self._uid
res_user = self.env['res.users'].search([('id', '=', self._uid)])
if res_user.has_group('hr_employee.GM'):
self.make_visible = False
else:
self.make_visible = True