[FIX] base_partner_merge: cleaner test for function fields

After commit 0ed63d73a6,
the hack used to detect fields.function is not supported
anymore. Using `isinstance` is safer and cleaner anyway
(performance is not a concern here).
This commit is contained in:
Olivier Dony 2015-03-24 15:43:37 +01:00
parent ccfdca99fb
commit d544bb9b46
1 changed files with 2 additions and 2 deletions

View File

@ -245,12 +245,12 @@ class MergePartnerAutomatic(osv.TransientModel):
for record in proxy.browse(cr, openerp.SUPERUSER_ID, record_ids, context=context):
try:
proxy_model = self.pool[record.model]
field_type = proxy_model._columns[record.name].__class__._type
column = proxy_model._columns[record.name]
except KeyError:
# unknown model or field => skip
continue
if field_type == 'function':
if isinstance(column, fields.function):
continue
for partner in src_partners: