Commit 4ebc82f4 by François C.

Merge branch '6090-nb-de-rattrapages-negatifs-le-retour' into 'dev_cooperatic'

6090 nb de rattrapages negatifs le retour

See merge request !264
parents 3a3e7d21 61251cd1
Pipeline #3400 failed with stage
in 1 minute 7 seconds
......@@ -964,7 +964,12 @@ class CagetteMember(models.Model):
api = OdooAPI()
res = {}
f = { 'makeups_to_do': int(member_data["target_makeups_nb"]) }
# Prevent setting a negative number of makeups_to_do
# https://redmine.coopdev.fr/issues/6090
# This could happen when bdm has two screens open and clicks on minus btn on a coop line
# with exactly 1 makeup_to_do on both screens
makeups_to_do = max(0,int(member_data["target_makeups_nb"]))
f = { 'makeups_to_do': makeups_to_do }
res_item = api.update('res.partner', [self.id], f)
res = {
'mid': self.id,
......
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