Merge PR #785 into 14.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2021-02-19 16:13:35 +00:00
3 changed files with 10 additions and 1 deletions

View File

@@ -114,3 +114,9 @@ class AccountBankingMandate(models.Model):
)
else:
logger.info("0 SDD Mandates had to be set to Expired")
def print_report(self):
self.ensure_one()
xmlid = "account_banking_sepa_direct_debit.report_sepa_direct_debit_mandate"
action = self.env.ref(xmlid).report_action(self)
return action

View File

@@ -29,7 +29,7 @@
/>
<field
name="print_report_name"
>'Mandate-%s-%s' % (object.unique_mandate_reference, object.partner_id.name.replace(' ', '_')</field>
>'Mandate-%s-%s' % (object.unique_mandate_reference, object.partner_id.name.replace(' ', '_'))</field>
<field name="binding_model_id" ref="model_account_banking_mandate" />
</record>
</odoo>

View File

@@ -12,6 +12,9 @@
<field name="model">account.banking.mandate</field>
<field name="inherit_id" ref="account_banking_mandate.view_mandate_form" />
<field name="arch" type="xml">
<button name="validate" position="before">
<button name="print_report" type="object" string="Print" />
</button>
<field name="partner_id" position="after">
<field
name="scheme"