Merge pull request #775 from akretion/10-check_deposit_print_button

[10.0] account_check_deposit: add print button
This commit is contained in:
Alexis de Lattre
2019-03-02 12:18:04 +01:00
committed by GitHub
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>