From 56177da6c576f4927dd35b4ae8584c166847cb1e Mon Sep 17 00:00:00 2001 From: "pso (OpenERP)" Date: Mon, 20 Aug 2012 13:00:38 +0530 Subject: [PATCH] [IMP] Improved default view and method of set accounting options wizard bzr revid: pso@tinyerp.com-20120820073038-3dmkx96br61t9gd0 --- addons/account/account.py | 9 +++------ addons/account/account_view.xml | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index ad1d5a9bca3..c10935a38fc 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -3039,12 +3039,9 @@ class wizard_multi_charts_accounts(osv.osv_memory): company_id = res.get('company_id') or False if company_id: company_obj = self.pool.get('res.company') - company = company_obj.browse(cr, uid, company_id, context=context) - if company.country_id and company.country_id.currency_id: - res.update({'currency_id': company.country_id.currency_id.id}) - else: - currency_id = company_obj._get_euro(cr, uid, context=context) - res.update({'currency_id': currency_id}) + country_id = company_obj.browse(cr, uid, company_id, context=context).country_id.id + currency_id = company_obj.on_change_country(cr, uid, company_id, country_id, context=context)['value']['currency_id'] + res.update({'currency_id': currency_id}) ids = self.pool.get('account.chart.template').search(cr, uid, [('visible', '=', True)], context=context) if ids: diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 33d15184ec2..33d360a386a 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2371,6 +2371,7 @@