improve_ergonomy
bzr revid: fp@tinyerp.com-20081027115259-v9erput59mnay2x8
This commit is contained in:
parent
16bef69330
commit
732584721b
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
@ -1607,6 +1607,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Generate Chart of Accounts from a Chart Template">
|
||||
<separator col="4" colspan="4" string="Generate Chart of Accounts from a Chart Template"/>
|
||||
<label align="0.0" string="This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template" colspan="4"/>
|
||||
<field name="company_id" />
|
||||
<field name ="code_digits" />
|
||||
<field name="chart_template_id" colspan="4"/>
|
||||
|
|
Loading…
Reference in New Issue