[FIX] number digits is returned before assignment in case of property exist but account not

This commit is contained in:
Adrien Peiffer
2014-11-28 09:09:32 +01:00
parent 69dd10dea9
commit f0a6c9f559

View File

@@ -261,6 +261,7 @@ class wizard_update_charts_accounts(orm.TransientModel):
('res_id', '=', False),
('value_reference', '!=', False)
])
number_digits = 6
if not property_ids:
# Try to get a generic (no-company) property
property_ids = property_obj.search(cr, uid, [
@@ -268,7 +269,6 @@ class wizard_update_charts_accounts(orm.TransientModel):
('res_id', '=', False),
('value_reference', '!=', False)
])
number_digits = 6
if property_ids:
prop = property_obj.browse(
cr, uid, property_ids[0], context=context)