Commit e08af6b2 by Damien Moulard

don't fetch associated people for envelops members search

parent 66e8a55a
Pipeline #3424 failed with stage
in 1 minute 8 seconds
......@@ -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;
......
......@@ -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
......
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