Commit 0d99ba40 by Yvon

do not fetch res_partner with parent_member_num when looking for members with…

do not fetch res_partner with parent_member_num when looking for members with short option (associated to a search from brinks)
parent 3f1b6284
...@@ -877,8 +877,13 @@ class CagetteMember(models.Model): ...@@ -877,8 +877,13 @@ class CagetteMember(models.Model):
del partner['parent_name'] del partner['parent_name']
return res return res
elif search_type == "short": #do not show rattaché user (only the member user)
fields = CagetteMember.m_short_default_fields
fields = fields + ['total_partner_owned_share','amount_subscription']
cond.append(['parent_member_num', '=', 0])
res = api.search_read('res.partner', cond, fields)
return res
else: else:
# TODO differentiate short & subscription_data searches
fields = CagetteMember.m_short_default_fields 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) res = api.search_read('res.partner', cond, fields)
......
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