Commit 300bc6a4 by François C.

Modify sent data to allow handle setting for external login

parent 4827eed4
Pipeline #2225 passed with stage
in 1 minute 25 seconds
...@@ -138,7 +138,7 @@ class CagetteMember(models.Model): ...@@ -138,7 +138,7 @@ class CagetteMember(models.Model):
cond.append(['is_member', '=', True]) cond.append(['is_member', '=', True])
cond.append(['is_associated_people', '=', True]) cond.append(['is_associated_people', '=', True])
fields = ['name', 'email', 'birthdate', 'create_date', 'cooperative_state', 'is_associated_people'] fields = ['name', 'email', 'birthdate', 'create_date', 'cooperative_state', 'is_associated_people', 'barcode_base']
res = api.search_read('res.partner', cond, fields) res = api.search_read('res.partner', cond, fields)
if (res and len(res) >= 1): if (res and len(res) >= 1):
coop_id = None coop_id = None
...@@ -169,6 +169,7 @@ class CagetteMember(models.Model): ...@@ -169,6 +169,7 @@ class CagetteMember(models.Model):
data['firstname'] = name_elts['firstname'] data['firstname'] = name_elts['firstname']
else: else:
data['firstname'] = '' data['firstname'] = ''
data['coop_num'] = coop['barcode_base']
if not ('auth_token' in data): if not ('auth_token' in data):
data['failure'] = True data['failure'] = True
......
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