Commit 02b48dfc by Yvon

comment code

parent b564b158
Pipeline #3188 failed with stage
in 1 minute 4 seconds
...@@ -186,6 +186,7 @@ class CagetteShift(models.Model): ...@@ -186,6 +186,7 @@ class CagetteShift(models.Model):
return shiftData return shiftData
def get_count_of_makeups_to_come_per_partner(self): def get_count_of_makeups_to_come_per_partner(self):
"""Returns a dictionary with : keys = the partners ids having at least one makeup to come ; values = #makeups_to_come"""
fields = ['partner_id'] fields = ['partner_id']
cond = [['state', '=', 'open'], ['date_begin', '>', datetime.datetime.now().isoformat()], ['is_makeup', '=', True]] cond = [['state', '=', 'open'], ['date_begin', '>', datetime.datetime.now().isoformat()], ['is_makeup', '=', True]]
shift_data = self.o_api.search_read('shift.registration', cond, fields) shift_data = self.o_api.search_read('shift.registration', cond, fields)
......
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