From f0a6c9f559c4450aea00bf38f535df6d987d823a Mon Sep 17 00:00:00 2001 From: Adrien Peiffer Date: Fri, 28 Nov 2014 09:09:32 +0100 Subject: [PATCH] [FIX] number digits is returned before assignment in case of property exist but account not --- account_chart_update/wizard/wizard_chart_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index 7064e22e9..d358e36f0 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -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)