From 45813ba7b030cd1d35b6e381579e56bb163ea344 Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Wed, 14 Feb 2018 00:57:02 +0100 Subject: [PATCH] [FIX] partner_multi_relation. Wrong self instead of this. --- .../models/res_partner_relation_type.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/partner_multi_relation/models/res_partner_relation_type.py b/partner_multi_relation/models/res_partner_relation_type.py index f10968ceb..ad8eec3f5 100644 --- a/partner_multi_relation/models/res_partner_relation_type.py +++ b/partner_multi_relation/models/res_partner_relation_type.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2013-2017 Therp BV +# Copyright 2013-2018 Therp BV . # 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 @@ -112,11 +112,11 @@ class ResPartnerRelationType(models.Model): 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 @@ -134,7 +134,7 @@ class ResPartnerRelationType(models.Model): 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