Browse Source

[FIX] search both sides of the relation isolated to avoid false

positives
pull/103/head
Holger Brunn 10 years ago
committed by Sandy Carter
parent
commit
ad3455c17f
  1. 11
      partner_relations/model/res_partner.py

11
partner_relations/model/res_partner.py

@ -106,11 +106,18 @@ class ResPartner(orm.Model):
.search(
cr, uid,
[
'|',
('type_id.name', arg[1], arg[2]),
('type_id.name_inverse', arg[1], arg[2]),
('record_type', '=', 'a'),
],
context=context)
relation_type_selection_ids.extend(
relation_type_selection.search(
cr, uid,
[
('type_id.name_inverse', arg[1], arg[2]),
('record_type', '=', 'b'),
],
context=context))
if not relation_type_selection_ids:
result = AND([result, [FALSE_LEAF]])

Loading…
Cancel
Save