Commit 3a3e7d21 by Yvon Kerdoncuff

Merge branch '6001-CAGETTE-repercuter-les-rattrapages-deja-choisis-du-suppléant'…

Merge branch '6001-CAGETTE-repercuter-les-rattrapages-deja-choisis-du-suppléant' into 'dev_cooperatic'

fix computation of new makeups_to_do of titulaire when creating pair by taking…

See merge request !265
parents 1dea5f90 28c47c33
Pipeline #3389 failed with stage
in 1 minute 5 seconds
......@@ -843,7 +843,9 @@ def create_pair(request):
# le suppléant a des rattrapages
if child_makeups + parent_makeups <=2:
# on transfert les rattrapages sur le parent
api.update("res.partner", [parent_id], {"makeups_to_do": parent['makeups_to_do'] + child['makeups_to_do']})
# Comme on annule les services du suppléant, on ajoute en makeup_to_do du titulaire les rattrapages choisis ou non du suppléant
api.update("res.partner", [parent_id], {"makeups_to_do": parent['makeups_to_do'] + child_makeups})
# On annule les rattrapages du child
api.update('res.partner', [child_id], {"makeups_to_do": 0})
......
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