Commit 8e1fb25c by Yvon Kerdoncuff

get_shift_template_registration_ids method and usage fixes

parent d985e9e4
......@@ -1082,14 +1082,14 @@ class CagetteMember(models.Model):
def get_shift_template_registration_ids(self):
c = [['partner_id', '=', self.id]]
f = ['id']
return self.o_api.search_read("shift.template.registration", c, f)
return [x['id'] for x in self.o_api.search_read("shift.template.registration", c, f)]
def unsubscribe_member_but_exogenous_makeups(self):
return self.o_api.execute(
'shift.template.registration',
'unlink_but_exogenous_makeups',
[self.get_shift_template_registration_ids()]
self.get_shift_template_registration_ids()
)
......@@ -1097,7 +1097,7 @@ class CagetteMember(models.Model):
return self.o_api.execute(
'shift.template.registration',
'unlink',
[self.get_shift_template_registration_ids()]
self.get_shift_template_registration_ids()
)
def set_cooperative_state(self, state):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment