Commit ed4c4c1a by Damien Moulard

more debugging

parent a8cc5d42
......@@ -31,7 +31,6 @@ function request_delay() {
idPartner: partner_data.partner_id,
start_date: delay_start,
duration: diff_days,
shift_type: (partner_data.in_ftop_team === "True") ? "ftop" : "standard"
},
success: function() {
partner_data.cooperative_state = 'delay';
......
......@@ -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. ` +
`Il n'est plus possible de l'échanger.`);
} else {
alert(`Une erreur est survenue.` +
`Il est néanmoins possible que la requête ait abouti,` +
alert(`Une erreur est survenue. ` +
`Il est néanmoins possible que la requête ait abouti, ` +
`veuillez patienter quelques secondes puis vérifier vos services enregistrés.`);
}
......
......@@ -311,7 +311,7 @@ class CagetteShift(models.Model):
makeups_to_do -= 1
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:
return "makeups already at 0"
......
......@@ -290,16 +290,6 @@ def request_delay(request):
try:
new_id = cs.create_delay(data, duration)
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}
else:
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