[IMP]:base installer,account

bzr revid: nch@tinyerp.com-20100510095658-y5512gbr530rsmmw
This commit is contained in:
nch@tinyerp.com 2010-05-10 15:26:58 +05:30
parent c3a9e1c4dd
commit bd868903fa
4 changed files with 9 additions and 8 deletions

View File

@ -34,11 +34,11 @@
<group colspan="8">
<group colspan="4" height="450" width="600">
<field name="charts"/>
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
<group colspan="4" attrs="{'invisible':[('charts','!=','l10n_chart_configurable')]}">
<field name="sale_tax" colspan="2"/>
<field name="purchase_tax" colspan="2"/>
</group>
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
<group colspan="4" attrs="{'invisible':[('charts','!=','l10n_chart_configurable')]}">
<separator col="4" colspan="4" string="Bank and Cost Account"/>
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<form string="Bank Information">

View File

@ -1712,7 +1712,7 @@
</xpath>
<group string="res_config_contents" position="replace">
<field name="company_id" widget="selection"
groups="base.group_multi_company"/>
/>
<field name ="code_digits" />
<field name="chart_template_id"/>
<field name ="seq_journal" />
@ -1721,12 +1721,12 @@
<form string="Bank Information">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id"/>
<field name="currency_id" widget="selection"/>
</form>
<tree editable="bottom" string="Bank Information">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id"/>
<field name="currency_id" widget="selection"/>
</tree>
</field>
</group>

View File

@ -37,7 +37,6 @@ class account_installer(osv.osv_memory):
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids)),
key=itemgetter(1)))
charts.insert(0,('configurable','Configurable Chart of Account'))
return charts
# def default_get(self, cr, uid, fields_list=None, context=None):
@ -85,7 +84,7 @@ class account_installer(osv.osv_memory):
'period':lambda *a:'month',
'sale_tax':lambda *a:0.0,
'purchase_tax':lambda *a:0.0,
'charts':'configurable',
'charts':'l10n_chart_configurable',
}
def on_change_start_date(self, cr, uid, id, start_date):
@ -99,7 +98,7 @@ class account_installer(osv.osv_memory):
super(account_installer, self).execute(cr, uid, ids, context=context)
record = self.browse(cr, uid, ids, context=context)[0]
for res in self.read(cr,uid,ids):
if record.charts == 'configurable':
if record.charts == 'l10n_chart_configurable':
obj_acc = self.pool.get('account.account')
obj_tax = self.pool.get('account.tax')
user_type = self.pool.get('account.account.type')

View File

@ -94,6 +94,8 @@ class base_setup_installer(osv.osv_memory):
def onchange_moduleselection(self, cr, uid, ids, *args):
progress = self._progress(cr, uid) - (2.5 * len(filter(lambda x: x==1, args)))
if progress <= 5.0:
progress = 5.0
return {'value':{'progress':progress}}
def modules_to_install(self, cr, uid, ids, context=None):