Commit ab75f5d3 by François C.

Make leave starting 'now' to be retrieved to be used in members_space context for example

parent b7449d7f
Pipeline #4111 failed with stage
in 0 seconds
......@@ -111,7 +111,7 @@ class CagetteShift(models.Model):
# Is member in active leave period
now = datetime.datetime.now().isoformat()
cond = [['id', 'in', partnerData['leave_ids']],
['start_date', '<', now],
['start_date', '<=', now],
['stop_date', '>', now], ['state', '!=', 'cancel']]
fields = ['start_date', 'stop_date', 'type_id', 'state']
res_leaves = self.o_api.search_read('shift.leave', 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