Commit 1964bd13 by Damien Moulard

fix cagette_membership res_partner write & update error

parent 38988e61
...@@ -99,7 +99,6 @@ class ResPartner(models.Model): ...@@ -99,7 +99,6 @@ class ResPartner(models.Model):
@api.model @api.model
def update(self, vals): def update(self, vals):
res = super(ResPartner, self).write(vals)
#_logger.info("valeurs reçues pour update partner = %s", str(vals)) #_logger.info("valeurs reçues pour update partner = %s", str(vals))
state_to_record = "" state_to_record = ""
if 'cooperative_state' in vals: if 'cooperative_state' in vals:
...@@ -109,14 +108,13 @@ class ResPartner(models.Model): ...@@ -109,14 +108,13 @@ class ResPartner(models.Model):
state_to_record = vals['current_cooperative_state'] state_to_record = vals['current_cooperative_state']
if len(state_to_record) > 0: if len(state_to_record) > 0:
self._write_state_change(state_to_record) self._write_state_change(state_to_record)
return res return super(ResPartner, self).update(vals)
@api.model @api.model
def write(self, vals): def write(self, vals):
res = super(ResPartner, self).write(vals)
# _logger.info("valeurs reçues pour write partner = %s", str(vals)) # _logger.info("valeurs reçues pour write partner = %s", str(vals))
if 'cooperative_state' in vals: if 'cooperative_state' in vals:
self._write_state_change(vals['cooperative_state']) self._write_state_change(vals['cooperative_state'])
return res return super(ResPartner, self).write(vals)
\ No newline at end of file
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