Commit 66e5be54 by Félicie

fix bugs

parent c86826f8
Pipeline #2115 passed with stage
in 1 minute 34 seconds
......@@ -556,8 +556,10 @@ def get_member_info(request, id):
member = member[0]
parent = None
if member['parent_id']:
parent = api.search_read('res.partner', [['id', '=', int(member['parent_id'][0])]], ['barcode_base'])[0]
member['parent_barcode_base'] = parent['barcode_base']
parent_barcode_base = api.search_read('res.partner', [['id', '=', int(member['parent_id'][0])]], ['barcode_base'])[0]
member['parent_barcode_base'] = parent_barcode_base['barcode_base']
parent_email = api.search_read('res.partner', [['id', '=', int(member['parent_id'][0])]], ['email'])[0]
member['parent_email'] = parent_email['email']
res['member'] = member
response = JsonResponse(res)
else:
......
......@@ -4,6 +4,9 @@ var childId = null;
var parentName = null;
var childName = null;
var parentEmail = null;
var childEmail = null;
const possible_cooperative_state = {
suspended: "Rattrapage",
exempted: "Exempté.e",
......@@ -440,10 +443,10 @@ $(document).ready(function() {
traditional: true,
contentType: "application/json; charset=utf-8",
success: function(data) {
parentName = data.member.parent_barcode_base + ' - ' + data.member.parent_name
parentEmail = data.member.email
childName = data.member.barcode_base + ' - ' + data.member.name
childEmail = data.member.email
parentName = data.member.parent_barcode_base + ' - ' + data.member.parent_name;
parentEmail = data.member.parent_email;
childName = data.member.barcode_base + ' - ' + data.member.name;
childEmail = data.member.email;
confirmDeletion(childId);
},
error: function(data) {
......
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