[PORT] value_reference of ir.property is a char

This commit is contained in:
Adrien Peiffer
2014-11-27 10:40:33 +01:00
parent b741d43169
commit 89a1bc710a

View File

@@ -272,7 +272,8 @@ class wizard_update_charts_accounts(orm.TransientModel):
if property_ids:
prop = property_obj.browse(
cr, uid, property_ids[0], context=context)
account_id = prop.value_reference.id
account_id = len(prop.value_reference.split(',')) == 2 and\
int(prop.value_reference.split(',')[1]) or False
if account_id:
code = account_obj.read(
cr, uid, account_id, ['code'], context)['code']