Commit 6aa05fdd by Damien Moulard

Merge branch '2459-search-associate-only-in-members' into 'dev_cooperatic'

2459-search-associate-only-in-members

See merge request !138
parents 5bc06b9f dca25d09
Pipeline #1914 passed with stage
in 1 minute 27 seconds
......@@ -775,9 +775,12 @@ class CagetteMember(models.Model):
cond = [['name', 'ilike', str(key)]]
cond.append('|')
cond.append(['is_member', '=', True])
cond.append(['is_associated_people', '=', True])
if search_type != 'members':
cond.append(['is_associated_people', '=', True])
else:
cond.append(['is_associated_people', '=', False])
# cond.append(['cooperative_state', '!=', 'unsubscribed'])
if search_type == "full":
if search_type == "full" or search_type == 'members':
fields = CagetteMember.m_default_fields
if not shift_id is None:
CagetteMember.m_default_fields.append('tmpl_reg_line_ids')
......
......@@ -689,7 +689,7 @@ $(document).ready(function() {
if (search_str) {
$.ajax({
url: '/members/search/' + search_str,
url: '/members/search/' + search_str+ "?search_type=members",
dataType : 'json',
success: function(data) {
members_search_results = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment