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
e08af6b2
Commit
e08af6b2
authored
May 02, 2024
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't fetch associated people for envelops members search
parent
66e8a55a
Pipeline
#3424
failed with stage
in 1 minute 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
envelops.js
envelops/static/js/envelops.js
+1
-1
models.py
members/models.py
+3
-3
No files found.
envelops/static/js/envelops.js
View file @
e08af6b2
...
...
@@ -226,7 +226,7 @@ function set_envelop_dom(envelop, envelop_name, envelop_content_id, envelop_inde
let
search_str
=
modal
.
find
(
'.search_member_input'
).
val
();
$
.
ajax
({
url
:
'/members/search/'
+
search_str
+
"?search_type=
short
"
,
url
:
'/members/search/'
+
search_str
+
"?search_type=
envelops
"
,
dataType
:
'json'
,
success
:
function
(
data
)
{
members_search_results
=
data
.
res
;
...
...
members/models.py
View file @
e08af6b2
...
...
@@ -808,7 +808,7 @@ class CagetteMember(models.Model):
cond
=
[[
'name'
,
'ilike'
,
str
(
key
)]]
cond
.
append
(
'|'
)
cond
.
append
([
'is_member'
,
'='
,
True
])
if
search_type
!=
'members'
:
if
search_type
!=
'members'
and
search_type
!=
'envelops'
:
cond
.
append
([
'is_associated_people'
,
'='
,
True
])
else
:
cond
.
append
([
'is_associated_people'
,
'='
,
False
])
...
...
@@ -881,9 +881,9 @@ class CagetteMember(models.Model):
return
res
else
:
# TODO differentiate
short
& subscription_data searches
# TODO differentiate
envelops
& subscription_data searches
fields
=
CagetteMember
.
m_short_default_fields
fields
=
fields
+
[
'total_partner_owned_share'
,
'amount_subscription'
]
fields
=
fields
+
[
'total_partner_owned_share'
,
'amount_subscription'
]
res
=
api
.
search_read
(
'res.partner'
,
cond
,
fields
)
return
res
...
...
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