[FIX]Set priority for bank statement form and import coda wizard returned action copy action in account_view.xml
bzr revid: dle@openerp.com-20121220173532-c7ecxa1d5x48a288
This commit is contained in:
parent
eed9b471ad
commit
512687db8a
|
@ -537,6 +537,7 @@
|
|||
<record id="view_bank_statement_form" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bank Statement" version="7.0">
|
||||
<header>
|
||||
|
@ -2232,6 +2233,7 @@
|
|||
<record id="view_bank_statement_form2" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Statement" version="7.0">
|
||||
<header>
|
||||
|
|
|
@ -388,14 +388,17 @@ class account_coda_import(osv.osv_memory):
|
|||
self.pool.get('account.bank.statement.line').create(cr, uid, data, context=context)
|
||||
if statement['coda_note'] != '':
|
||||
self.pool.get('account.bank.statement').write(cr, uid, [statement['id']], {'coda_note': statement['coda_note']}, context=context)
|
||||
model, action_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_bank_statement_tree')
|
||||
action = self.pool.get(model).browse(cr, uid, action_id, context=context)
|
||||
return {
|
||||
'name': 'Bank Statements',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.bank.statement',
|
||||
'view_id': False,
|
||||
'context': context,
|
||||
'name': action.name,
|
||||
'view_type': action.view_type,
|
||||
'view_mode': action.view_mode,
|
||||
'res_model': action.res_model,
|
||||
'domain': action.domain,
|
||||
'context': action.context,
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': action.search_view_id.id,
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue