|
|
@ -41,6 +41,13 @@ class ResPartnerRelation(models.Model): |
|
|
|
_description = 'Partner relation' |
|
|
|
_order = 'active desc, date_start desc, date_end desc' |
|
|
|
|
|
|
|
def _search_any_partner_id(self, operator, value): |
|
|
|
return [ |
|
|
|
'|', |
|
|
|
('left_partner_id', operator, value), |
|
|
|
('right_partner_id', operator, value), |
|
|
|
] |
|
|
|
|
|
|
|
def _get_computed_fields( |
|
|
|
self, cr, uid, ids, field_names, arg, context=None): |
|
|
|
'''Return a dictionary of dictionaries, with for every partner for |
|
|
@ -101,6 +108,7 @@ class ResPartnerRelation(models.Model): |
|
|
|
'res.partner', |
|
|
|
string='Partner', |
|
|
|
compute='_get_partner_type_any', |
|
|
|
search='_search_any_partner_id' |
|
|
|
) |
|
|
|
|
|
|
|
left_partner_id = fields.Many2one( |
|
|
|