[IMP] Improved default view and method of set accounting options wizard
bzr revid: pso@tinyerp.com-20120820073038-3dmkx96br61t9gd0
This commit is contained in:
parent
e8a3d11ba3
commit
56177da6c5
|
@ -3039,12 +3039,9 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||||
company_id = res.get('company_id') or False
|
company_id = res.get('company_id') or False
|
||||||
if company_id:
|
if company_id:
|
||||||
company_obj = self.pool.get('res.company')
|
company_obj = self.pool.get('res.company')
|
||||||
company = company_obj.browse(cr, uid, company_id, context=context)
|
country_id = company_obj.browse(cr, uid, company_id, context=context).country_id.id
|
||||||
if company.country_id and company.country_id.currency_id:
|
currency_id = company_obj.on_change_country(cr, uid, company_id, country_id, context=context)['value']['currency_id']
|
||||||
res.update({'currency_id': company.country_id.currency_id.id})
|
res.update({'currency_id': currency_id})
|
||||||
else:
|
|
||||||
currency_id = company_obj._get_euro(cr, uid, context=context)
|
|
||||||
res.update({'currency_id': currency_id})
|
|
||||||
|
|
||||||
ids = self.pool.get('account.chart.template').search(cr, uid, [('visible', '=', True)], context=context)
|
ids = self.pool.get('account.chart.template').search(cr, uid, [('visible', '=', True)], context=context)
|
||||||
if ids:
|
if ids:
|
||||||
|
|
|
@ -2371,6 +2371,7 @@
|
||||||
<div groups="base.group_multi_company">
|
<div groups="base.group_multi_company">
|
||||||
<label for="company_id"/>
|
<label for="company_id"/>
|
||||||
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||||
|
<label for="currency_id"/>
|
||||||
<field name="currency_id" />
|
<field name="currency_id" />
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
|
|
Loading…
Reference in New Issue