Add button for direct access to journal entry from journal items

This commit is contained in:
Alexis de Lattre
2017-03-03 09:36:08 +01:00
parent 15d9c31f6f
commit e20f88baf0
2 changed files with 14 additions and 0 deletions

View File

@@ -190,6 +190,19 @@ class AccountMoveLine(models.Model):
else:
self.credit = amount_company_currency
@api.multi
def show_account_move_form(self):
self.ensure_one()
action = self.env['ir.actions.act_window'].for_xml_id(
'account', 'action_move_line_form')
action.update({
'res_id': self.move_id.id,
'view_id': False,
'views': False,
'view_mode': 'form,tree',
})
return action
class AccountBankStatement(models.Model):
_inherit = 'account.bank.statement'