Commit 3368b375 by François C.

Add log data when reopen_registration

parent b009c6b2
Pipeline #2406 passed with stage
in 1 minute 26 seconds
......@@ -632,9 +632,15 @@ class CagetteServices(models.Model):
@staticmethod
def reopen_registration(registration_id, overrided_date=""):
api = OdooAPI()
f = {'state': 'open'}
try:
cond = [['id', '=', int(registration_id)]]
fields = ['partner_id']
res = api.search_read('shift.registration', cond, fields)
coop_logger.info("On invalide la présence de %s ", res[0]['partner_id'][1])
except Exception as e:
coop_logger.error("On invalide shift_registration %s (erreur : %s)", str(registration_id), str(e))
return api.update('shift.registration', [int(registration_id)], f)
@staticmethod
......
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