From 65422224134e19d9f855eb5cfcf3e4e0aad11d99 Mon Sep 17 00:00:00 2001 From: Benjamin <benjamin@le-filament.com> Date: Wed, 27 May 2020 13:37:57 +0200 Subject: [PATCH] [cgscop #166] trace modification logo --- models/res_partner.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/res_partner.py b/models/res_partner.py index 4c269fe..20bd90e 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -556,6 +556,11 @@ class ScopPartner(models.Model): vals['city'] = vals.get('city').upper() result = super(ScopPartner, self).write(vals) + if 'image' in vals: + self.message_post( + body="Modification Logo", + subtype='cgscop_base.cg_values_change', + ) for partner in self: if (not partner.is_company and partner.type == 'contact' @@ -574,6 +579,7 @@ class ScopPartner(models.Model): partner.creation_delegate_id.partner_id.id ] partner.message_subscribe(partner_ids=partners_to_subscribe) + return result # Création d'une période lors de la création d'une coopérative -- GitLab