Add button to show account move from bank statement line
This commit is contained in:
@@ -179,6 +179,18 @@ class AccountBankStatementLine(models.Model):
|
|||||||
search_reconciliation_proposition=search_rec_prop,
|
search_reconciliation_proposition=search_rec_prop,
|
||||||
context=context)
|
context=context)
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def show_account_move(self):
|
||||||
|
self.ensure_one()
|
||||||
|
action = self.env['ir.actions.act_window'].for_xml_id(
|
||||||
|
'account', 'action_move_journal_line')
|
||||||
|
action.update({
|
||||||
|
'views': False,
|
||||||
|
'view_id': False,
|
||||||
|
'view_mode': 'form,tree',
|
||||||
|
'res_id': self.id,
|
||||||
|
})
|
||||||
|
return action
|
||||||
|
|
||||||
class ResPartner(models.Model):
|
class ResPartner(models.Model):
|
||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
|
|||||||
@@ -182,5 +182,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_bank_statement_form" model="ir.ui.view">
|
||||||
|
<field name="name">usability.account.bank.statement.form</field>
|
||||||
|
<field name="model">account.bank.statement</field>
|
||||||
|
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='line_ids']/tree/field[@name='bank_account_id']" position="after">
|
||||||
|
<!-- The cancel button is provided by the account_cancel module, but we don't want to depend on it -->
|
||||||
|
<button name="show_account_move" type="object"
|
||||||
|
string="View Account Move" icon="gtk-redo"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|||||||
Reference in New Issue
Block a user