Add button for direct access to journal entry from journal items
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -234,6 +234,7 @@ module -->
|
||||
<field name="reconcile_ref" position="after">
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
<button name="show_account_move_form" type="object" icon="STOCK_GO_FORWARD" string="Show Journal Entry"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user