Commit 49fce986 by François C.

Merge branch '2186-remove-welcome-point' into 'dev_cooperatic'

#2186 remove first point

See merge request !113
parents ad71aad1 b6edcf6f
Pipeline #1751 passed with stage
in 1 minute 37 seconds
...@@ -84,7 +84,7 @@ class CagetteMember(models.Model): ...@@ -84,7 +84,7 @@ class CagetteMember(models.Model):
'point_qty': pts 'point_qty': pts
} }
""" """
try: try:
return self.o_api.create('shift.counter.event', data) return self.o_api.create('shift.counter.event', data)
except Exception as e: except Exception as e:
...@@ -152,7 +152,7 @@ class CagetteMember(models.Model): ...@@ -152,7 +152,7 @@ class CagetteMember(models.Model):
if (password == d + m + y): if (password == d + m + y):
if coop_id is None: if coop_id is None:
coop_id = coop['id'] coop_id = coop['id']
data['id'] = coop_id data['id'] = coop_id
auth_token_seed = fp + coop['create_date'] auth_token_seed = fp + coop['create_date']
data['auth_token'] = hashlib.sha256(auth_token_seed.encode('utf-8')).hexdigest() data['auth_token'] = hashlib.sha256(auth_token_seed.encode('utf-8')).hexdigest()
data['token'] = hashlib.sha256(coop['create_date'].encode('utf-8')).hexdigest() data['token'] = hashlib.sha256(coop['create_date'].encode('utf-8')).hexdigest()
...@@ -508,7 +508,7 @@ class CagetteMember(models.Model): ...@@ -508,7 +508,7 @@ class CagetteMember(models.Model):
stype = shift_template['data']['type'] stype = shift_template['data']['type']
res['shift'] = \ res['shift'] = \
m.create_coop_shift_subscription(shift_t_id, stype) m.create_coop_shift_subscription(shift_t_id, stype)
m.add_first_point(stype) # m.add_first_point(stype) # Not needed anymore
# Update couchdb do with new data # Update couchdb do with new data
try: try:
...@@ -846,7 +846,7 @@ class CagetteMember(models.Model): ...@@ -846,7 +846,7 @@ class CagetteMember(models.Model):
def update_member_makeups(self, member_data): def update_member_makeups(self, member_data):
api = OdooAPI() api = OdooAPI()
res = {} res = {}
f = { 'makeups_to_do': int(member_data["target_makeups_nb"]) } f = { 'makeups_to_do': int(member_data["target_makeups_nb"]) }
res_item = api.update('res.partner', [self.id], f) res_item = api.update('res.partner', [self.id], f)
res = { res = {
...@@ -1463,4 +1463,3 @@ class CagetteUser(models.Model): ...@@ -1463,4 +1463,3 @@ class CagetteUser(models.Model):
pass pass
return answer return answer
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