Skip to content

Commit

Permalink
[FIX] partner_multi_relation. Wrong self instead of this.
Browse files Browse the repository at this point in the history
  • Loading branch information
NL66278 committed Feb 13, 2018
1 parent 65631c8 commit 11a303f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions partner_multi_relation/models/res_partner_relation_type.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2013-2017 Therp BV <http://therp.nl>
# Copyright 2013-2018 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
"""Define the type of relations that can exist between partners."""
from openerp import _, api, fields, models
Expand Down Expand Up @@ -112,11 +112,11 @@ def get_category_condition(vals, side):
return [(fieldname2, 'not in', [category_id])]
return []

for rec in self:
for this in self:
handling = (
'handle_invalid_onchange' in vals and
vals['handle_invalid_onchange'] or
self.handle_invalid_onchange
this.handle_invalid_onchange
)
if handling == 'ignore':
continue
Expand All @@ -134,7 +134,7 @@ def get_category_condition(vals, side):
return
# only look at relations for this type
invalid_domain = AND([
[('type_id', '=', rec.id)], invalid_conditions
[('type_id', '=', this.id)], invalid_conditions
])
invalid_relations = relation_model.with_context(
active_test=False
Expand Down

0 comments on commit 11a303f

Please sign in to comment.