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
da9f2673
Commit
da9f2673
authored
Apr 15, 2021
by
François
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Facilitation accès boutique : pas de contrainte stock et accès contact
parent
76e3127d
Pipeline
#825
failed with stage
in 10 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
.gitlab-ci.yml
.gitlab-ci.yml
+1
-0
models.py
members/models.py
+3
-1
models.py
shop/models.py
+1
-1
No files found.
.gitlab-ci.yml
View file @
da9f2673
...
@@ -5,4 +5,5 @@ lint:js:
...
@@ -5,4 +5,5 @@ lint:js:
paths
:
paths
:
-
node_modules/
-
node_modules/
script
:
script
:
-
source ~/.profile
-
make lint-js
-
make lint-js
members/models.py
View file @
da9f2673
...
@@ -93,7 +93,9 @@ class CagetteMember(models.Model):
...
@@ -93,7 +93,9 @@ class CagetteMember(models.Model):
fp
=
request
.
POST
.
get
(
'fp'
)
# fingerprint (prevent using stolen cookies)
fp
=
request
.
POST
.
get
(
'fp'
)
# fingerprint (prevent using stolen cookies)
if
login
and
password
:
if
login
and
password
:
api
=
OdooAPI
()
api
=
OdooAPI
()
cond
=
[[
'email'
,
'='
,
login
],
[
'is_member'
,
'='
,
True
]]
cond
=
[[
'email'
,
'='
,
login
]]
if
getattr
(
settings
,
'ALLOW_NON_MEMBER_TO_CONNECT'
,
False
)
is
False
:
cond
.
append
([
'is_member'
,
'='
,
True
])
fields
=
[
'name'
,
'email'
,
'birthdate'
,
'create_date'
,
'cooperative_state'
]
fields
=
[
'name'
,
'email'
,
'birthdate'
,
'create_date'
,
'cooperative_state'
]
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
):
...
...
shop/models.py
View file @
da9f2673
...
@@ -62,7 +62,7 @@ class CagetteShop(models.Model):
...
@@ -62,7 +62,7 @@ class CagetteShop(models.Model):
def
filter_products_according_settings
(
pdts
):
def
filter_products_according_settings
(
pdts
):
res
=
pdts
res
=
pdts
try
:
try
:
conditions
=
settings
.
SHOP_LIMIT_PRODUCTS
conditions
=
gettattr
(
settings
,
'SHOP_LIMIT_PRODUCTS'
,
[])
filtered
=
[]
filtered
=
[]
for
p
in
pdts
:
for
p
in
pdts
:
keep_it
=
True
keep_it
=
True
...
...
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