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
49fce986
Commit
49fce986
authored
Feb 03, 2022
by
François C.
Browse files
Options
Browse Files
Download
Plain Diff
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
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 @
49fce986
...
@@ -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
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