Commit 81e79035 by Yvon Kerdoncuff

#7412 : set suppleant_member_id to None in delete_pair_core

parent c1486cb1
...@@ -1009,7 +1009,7 @@ def delete_pair_core(data): ...@@ -1009,7 +1009,7 @@ def delete_pair_core(data):
child_contact = api.search_read('res.partner', [['id', '=', child_contact_id]], ['email', 'id', 'parent_id', 'suppleant_member_id'])[0] child_contact = api.search_read('res.partner', [['id', '=', child_contact_id]], ['email', 'id', 'parent_id', 'suppleant_member_id'])[0]
parent = api.search_read('res.partner', [['id', '=', child_contact['parent_id'][0]]], ['cooperative_state'])[0] parent = api.search_read('res.partner', [['id', '=', child_contact['parent_id'][0]]], ['cooperative_state'])[0]
api.update('res.partner', [child_contact_id], {"parent_id": False, "is_associated_people": False, "active": False, api.update('res.partner', [child_contact_id], {"parent_id": False, "is_associated_people": False, "active": False,
"is_former_associated_people": True}) "is_former_associated_people": True, "suppleant_member_id": None})
child_member_update_fields = {'cooperative_state': "unsubscribed", "is_former_associated_people": True} child_member_update_fields = {'cooperative_state': "unsubscribed", "is_former_associated_people": True}
if 'gone' in data and 'child' in data['gone']: if 'gone' in data and 'child' in data['gone']:
child_member_update_fields['cooperative_state'] = "gone" child_member_update_fields['cooperative_state'] = "gone"
......
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