Browse Source

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

positives
pull/84/head
Holger Brunn 10 years ago
parent
commit
edca46c71c
  1. 11
      partner_relations/model/res_partner.py

11
partner_relations/model/res_partner.py

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

Loading…
Cancel
Save