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
a91c4f18
Commit
a91c4f18
authored
Sep 14, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bdm admin member search
parent
5659046c
Pipeline
#2375
failed with stage
in 1 minute 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
models.py
members/models.py
+5
-2
manage_regular_shifts.js
members/static/js/admin/manage_regular_shifts.js
+1
-1
manage_shift_registrations.js
members/static/js/admin/manage_shift_registrations.js
+1
-1
No files found.
members/models.py
View file @
a91c4f18
...
@@ -794,7 +794,7 @@ class CagetteMember(models.Model):
...
@@ -794,7 +794,7 @@ class CagetteMember(models.Model):
else
:
else
:
cond
.
append
([
'is_associated_people'
,
'='
,
False
])
cond
.
append
([
'is_associated_people'
,
'='
,
False
])
# cond.append(['cooperative_state', '!=', 'unsubscribed'])
# cond.append(['cooperative_state', '!=', 'unsubscribed'])
if
search_type
==
"full"
or
search_type
==
'members'
:
if
search_type
==
"full"
or
search_type
==
'members'
or
search_type
==
"manage_shift_registrations"
:
fields
=
CagetteMember
.
m_default_fields
fields
=
CagetteMember
.
m_default_fields
if
not
shift_id
is
None
:
if
not
shift_id
is
None
:
CagetteMember
.
m_default_fields
.
append
(
'tmpl_reg_line_ids'
)
CagetteMember
.
m_default_fields
.
append
(
'tmpl_reg_line_ids'
)
...
@@ -840,7 +840,7 @@ class CagetteMember(models.Model):
...
@@ -840,7 +840,7 @@ class CagetteMember(models.Model):
elif
search_type
==
"shift_template_data"
:
elif
search_type
==
"shift_template_data"
:
fields
=
CagetteMember
.
m_short_default_fields
fields
=
CagetteMember
.
m_short_default_fields
fields
=
fields
+
[
'id'
,
'makeups_to_do'
,
'cooperative_state'
]
fields
=
fields
+
[
'id'
,
'makeups_to_do'
,
'cooperative_state'
,
'parent_name'
]
res
=
api
.
search_read
(
'res.partner'
,
cond
,
fields
)
res
=
api
.
search_read
(
'res.partner'
,
cond
,
fields
)
if
res
:
if
res
:
...
@@ -853,6 +853,9 @@ class CagetteMember(models.Model):
...
@@ -853,6 +853,9 @@ class CagetteMember(models.Model):
partner
[
'shift_template_id'
]
=
shift_template_reg
[
0
][
'shift_template_id'
]
partner
[
'shift_template_id'
]
=
shift_template_reg
[
0
][
'shift_template_id'
]
else
:
else
:
partner
[
'shift_template_id'
]
=
None
partner
[
'shift_template_id'
]
=
None
if
not
partner
[
'parent_name'
]
is
False
:
partner
[
'name'
]
+=
' (suppléant.e de son binôme '
+
partner
[
'parent_name'
]
+
')'
del
partner
[
'parent_name'
]
return
res
return
res
else
:
else
:
...
...
members/static/js/admin/manage_regular_shifts.js
View file @
a91c4f18
...
@@ -293,7 +293,7 @@ $(document).ready(function() {
...
@@ -293,7 +293,7 @@ $(document).ready(function() {
let
search_str
=
$
(
'#search_member_input'
).
val
();
let
search_str
=
$
(
'#search_member_input'
).
val
();
$
.
ajax
({
$
.
ajax
({
url
:
'/members/search/'
+
search_str
,
url
:
`/members/search/
${
search_str
}
?search_type=shift_template_data`
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
$
(
'#partner_data_area'
).
hide
();
$
(
'#partner_data_area'
).
hide
();
...
...
members/static/js/admin/manage_shift_registrations.js
View file @
a91c4f18
...
@@ -231,7 +231,7 @@ $(document).ready(function() {
...
@@ -231,7 +231,7 @@ $(document).ready(function() {
let
search_str
=
$
(
'#search_member_input'
).
val
();
let
search_str
=
$
(
'#search_member_input'
).
val
();
$
.
ajax
({
$
.
ajax
({
url
:
'/members/search/'
+
search_str
,
url
:
`/members/search/
${
search_str
}
?search_type=manage_shift_registrations`
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
members_search_results
=
[];
members_search_results
=
[];
...
...
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