diff --git a/addons/account/account.py b/addons/account/account.py index caa70065bb1..11f537d68fc 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1872,8 +1872,14 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'code_digits':fields.integer('# of Digits',required=True,help="No. of Digits to use for account code"), } + def _get_chart(self, cr, uid, context={}): + ids = self.pool.get('account.chart.template').search(cr, uid, [], context=context) + if ids: + return ids[0] + return False _defaults = { 'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr,uid,[uid],c)[0].company_id.id, + 'chart_template_id': _get_chart, 'code_digits': lambda *a:6, } diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 461ee657531..ed7967a2946 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -716,9 +716,9 @@ - + - + @@ -758,7 +758,7 @@ - + @@ -877,7 +877,7 @@ - + Entries Encoding by Move account.move form @@ -1353,9 +1353,9 @@ - - - + + + - - account.account.template.tree - account.account.template - tree - - - - - - - + + account.account.template.tree + account.account.template + tree + + + + + + + Account Templates @@ -1530,8 +1530,8 @@ - - + + @@ -1559,8 +1559,8 @@ - - + + account.tax.code.template.tree account.tax.code.template tree @@ -1598,50 +1598,51 @@ - + - Generate Chart of Accounts from a Chart Template - wizard.multi.charts.accounts - form - -
- - + Generate Chart of Accounts from a Chart Template + wizard.multi.charts.accounts + form + + + +