[IMP][ADD] account: added new parent view account for bank account and revert some changes from demo & removed sencondary currency assignment from confi. account dict.
bzr revid: vra@tinyerp.com-20100917054652-8b67g6hoat9mnb3k
This commit is contained in:
@@ -187,8 +187,8 @@
|
||||
<field name="code">1104</field>
|
||||
<field name="name">Bank Current Account</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset_view1"/>
|
||||
<field name="type">liquidity</field>
|
||||
<field name="user_type" ref="conf_account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="conf_cli" model="account.account.template">
|
||||
|
||||
@@ -195,7 +195,7 @@ class account_installer(osv.osv_memory):
|
||||
vals={
|
||||
'name': (obj_acc_root.id == account_template.id) and company_id.name or account_template.name,
|
||||
#'sign': account_template.sign,
|
||||
'currency_id': account_template.currency_id and account_template.currency_id.id or False,
|
||||
#'currency_id': account_template.currency_id and account_template.currency_id.id or False,
|
||||
'code': code_acc,
|
||||
'type': account_template.type,
|
||||
'user_type': account_template.user_type and account_template.user_type.id or False,
|
||||
@@ -209,6 +209,19 @@ class account_installer(osv.osv_memory):
|
||||
new_account = obj_acc.create(cr, uid, vals)
|
||||
acc_template_ref[account_template.id] = new_account
|
||||
if account_template.name == 'Bank Current Account':
|
||||
b_vals={
|
||||
'name': 'Bank Accounts',
|
||||
'code': '110500',
|
||||
'type': 'view',
|
||||
'user_type': account_template.parent_id.user_type and account_template.user_type.id or False,
|
||||
'shortcut': account_template.shortcut,
|
||||
'note': account_template.note,
|
||||
'parent_id': account_template.parent_id and ((account_template.parent_id.id in acc_template_ref) and acc_template_ref[account_template.parent_id.id]) or False,
|
||||
'tax_ids': [(6,0,tax_ids)],
|
||||
'company_id': company_id.id,
|
||||
}
|
||||
bank_account = obj_acc.create(cr, uid, b_vals)
|
||||
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Bank/Cash Journal View')])[0] #why fixed name here?
|
||||
view_id_cur = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #Why Fixed name here?
|
||||
ref_acc_bank = obj_multi.bank_account_view_id
|
||||
@@ -265,10 +278,10 @@ class account_installer(osv.osv_memory):
|
||||
|
||||
vals_bnk = {'name': val.acc_name or '',
|
||||
'currency_id': val.currency_id.id or False,
|
||||
'code': str(110400 + code_cnt),
|
||||
'code': str(110500 + code_cnt),
|
||||
'type': 'liquidity',
|
||||
'user_type': type,
|
||||
'parent_id':new_account,
|
||||
'parent_id':bank_account,
|
||||
'company_id': company_id.id }
|
||||
child_bnk_acc = obj_acc.create(cr, uid, vals_bnk)
|
||||
vals_seq_child = {
|
||||
|
||||
Reference in New Issue
Block a user