Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
b6edcf6f
Commit
b6edcf6f
authored
Feb 03, 2022
by
Thibault Grandjean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove first point
parent
ad71aad1
Pipeline
#1749
passed with stage
in 1 minute 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
models.py
members/models.py
+4
-5
No files found.
members/models.py
View file @
b6edcf6f
...
...
@@ -84,7 +84,7 @@ class CagetteMember(models.Model):
'point_qty': pts
}
"""
try
:
return
self
.
o_api
.
create
(
'shift.counter.event'
,
data
)
except
Exception
as
e
:
...
...
@@ -152,7 +152,7 @@ class CagetteMember(models.Model):
if
(
password
==
d
+
m
+
y
):
if
coop_id
is
None
:
coop_id
=
coop
[
'id'
]
data
[
'id'
]
=
coop_id
data
[
'id'
]
=
coop_id
auth_token_seed
=
fp
+
coop
[
'create_date'
]
data
[
'auth_token'
]
=
hashlib
.
sha256
(
auth_token_seed
.
encode
(
'utf-8'
))
.
hexdigest
()
data
[
'token'
]
=
hashlib
.
sha256
(
coop
[
'create_date'
]
.
encode
(
'utf-8'
))
.
hexdigest
()
...
...
@@ -508,7 +508,7 @@ class CagetteMember(models.Model):
stype
=
shift_template
[
'data'
][
'type'
]
res
[
'shift'
]
=
\
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
try
:
...
...
@@ -846,7 +846,7 @@ class CagetteMember(models.Model):
def
update_member_makeups
(
self
,
member_data
):
api
=
OdooAPI
()
res
=
{}
f
=
{
'makeups_to_do'
:
int
(
member_data
[
"target_makeups_nb"
])
}
res_item
=
api
.
update
(
'res.partner'
,
[
self
.
id
],
f
)
res
=
{
...
...
@@ -1463,4 +1463,3 @@ class CagetteUser(models.Model):
pass
return
answer
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment