[IMP] improved code
bzr revid: tpa@tinyerp.com-20130909065930-u9btuxnl7ot19fuo
This commit is contained in:
parent
2e4b5e8130
commit
84872f59c8
|
@ -3081,7 +3081,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||||
#set currecy_id based on selected COA template using ir.vaalues else current users company's currency
|
#set currecy_id based on selected COA template using ir.vaalues else current users company's currency
|
||||||
value_id = ir_values.search(cr, uid, [('model', '=', 'account.chart.template'), ('res_id', '=', chart_template_id)], limit=1, context=context)
|
value_id = ir_values.search(cr, uid, [('model', '=', 'account.chart.template'), ('res_id', '=', chart_template_id)], limit=1, context=context)
|
||||||
if value_id:
|
if value_id:
|
||||||
currency_id = int(ir_values.browse(cr, uid, val_id[0], context=context).value)
|
currency_id = int(ir_values.browse(cr, uid, value_id[0], context=context).value)
|
||||||
else:
|
else:
|
||||||
currency_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
|
currency_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||||
res['value'].update({'complete_tax_set': data.complete_tax_set, 'currency_id': currency_id})
|
res['value'].update({'complete_tax_set': data.complete_tax_set, 'currency_id': currency_id})
|
||||||
|
|
Loading…
Reference in New Issue