Commit ed4c4c1a by Damien Moulard

more debugging

parent a8cc5d42
...@@ -31,7 +31,6 @@ function request_delay() { ...@@ -31,7 +31,6 @@ function request_delay() {
idPartner: partner_data.partner_id, idPartner: partner_data.partner_id,
start_date: delay_start, start_date: delay_start,
duration: diff_days, duration: diff_days,
shift_type: (partner_data.in_ftop_team === "True") ? "ftop" : "standard"
}, },
success: function() { success: function() {
partner_data.cooperative_state = 'delay'; partner_data.cooperative_state = 'delay';
......
...@@ -94,8 +94,8 @@ function add_or_change_shift(new_shift_id) { ...@@ -94,8 +94,8 @@ function add_or_change_shift(new_shift_id) {
alert(`Désolé ! Le service que vous souhaitez échanger démarre dans moins de 24h. ` + alert(`Désolé ! Le service que vous souhaitez échanger démarre dans moins de 24h. ` +
`Il n'est plus possible de l'échanger.`); `Il n'est plus possible de l'échanger.`);
} else { } else {
alert(`Une erreur est survenue.` + alert(`Une erreur est survenue. ` +
`Il est néanmoins possible que la requête ait abouti,` + `Il est néanmoins possible que la requête ait abouti, ` +
`veuillez patienter quelques secondes puis vérifier vos services enregistrés.`); `veuillez patienter quelques secondes puis vérifier vos services enregistrés.`);
} }
......
...@@ -311,7 +311,7 @@ class CagetteShift(models.Model): ...@@ -311,7 +311,7 @@ class CagetteShift(models.Model):
makeups_to_do -= 1 makeups_to_do -= 1
f = { "makeups_to_do": makeups_to_do } f = { "makeups_to_do": makeups_to_do }
return self.o_api.update('res.partner', partner_id, f) return self.o_api.update('res.partner', [partner_id], f)
else: else:
return "makeups already at 0" return "makeups already at 0"
......
...@@ -290,16 +290,6 @@ def request_delay(request): ...@@ -290,16 +290,6 @@ def request_delay(request):
try: try:
new_id = cs.create_delay(data, duration) new_id = cs.create_delay(data, duration)
if (new_id): if (new_id):
try:
if ('shift_type' in request.POST):
shift_type = request.POST['shift_type']
# This is a hack to ensure that the coop goes in delay state when a delay is created
cm = CagetteMember(int(request.POST['idPartner']))
res_addpt = cm.add_pts(shift_type, 0, "[fo] passage en délai")
except Exception as e:
coop_logger.error("force_delay_status : %s, %s", str(e), str(data))
response = {'result': True} response = {'result': True}
else: else:
coop_logger.error("request delay : %s, %s", str(new_id), str(data)) coop_logger.error("request delay : %s, %s", str(new_id), str(data))
......
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