account_check_deposit: add print button

This commit is contained in:
Alexis de Lattre
2019-02-26 17:12:08 +01:00
parent de1b37b461
commit a847885b9d
2 changed files with 6 additions and 0 deletions

View File

@@ -263,6 +263,11 @@ class AccountCheckDeposit(models.Model):
else:
self.currency_id = self.journal_id.company_id.currency_id
def get_report(self):
action = self.env['report'].get_action(
self, 'account_check_deposit.report_checkdeposit')
return action
class AccountMoveLine(models.Model):
_inherit = "account.move.line"

View File

@@ -22,6 +22,7 @@
type="object" class="oe_highlight"/>
<button name="backtodraft" states="done"
string="Back to Draft" type="object" />
<button name="get_report" string="Print" type="object"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,done" />
</header>