[IMP] account_banking_mandate: Remove header and footer, new paper format to use all paper size

This commit is contained in:
sergio
2015-06-18 22:23:29 +02:00
committed by Enric Tobella
parent 8592e13e54
commit d372a5b1ee
4 changed files with 137 additions and 109 deletions

View File

@@ -40,6 +40,7 @@
'views/account_payment_view.xml',
'views/res_partner_bank_view.xml',
'data/mandate_reference_sequence.xml',
'data/report_paperformat.xml',
'security/mandate_security.xml',
'security/ir.model.access.csv',
'reports/account_banking_mandate_view.xml',

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="paperformat_euro_sepa_lowmargin" model="report.paperformat">
<field name="name">European A4 low margin for SEPA</field>
<field name="default" eval="True" />
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">10</field>
<field name="margin_bottom">10</field>
<field name="margin_left">5</field>
<field name="margin_right">5</field>
<field name="header_line" eval="False" />
<field name="header_spacing">0</field>
<field name="dpi">80</field>
</record>
</data>
</openerp>

View File

@@ -12,5 +12,9 @@
file="account_banking_mandate.account_banking_mandate"
/>
<record id="report_account_banking_mandate" model="ir.actions.report.xml">
<field name="paperformat_id" ref="account_banking_mandate.paperformat_euro_sepa_lowmargin"/>
</record>
</data>
</openerp>

View File

@@ -3,134 +3,135 @@
<data>
<template id="account_banking_mandate_document">
<t t-call="report.external_layout">
<div class="page">
<div class="row mt0">
<div class="col-xs-12">
<h4 t-if="o.scheme != 'B2B'"><strong>SEPA DIRECT DEBIT MANDATE</strong></h4>
<h4 t-if="o.scheme == 'B2B'"><strong>SEPA BUSINESS-TO-BUSINESS DIRECT DEBIT MANDATE</strong></h4>
<h5>Reference: <span t-field="o.unique_mandate_reference"/></h5>
</div>
<div class="page">
<div class="row mt0 mb16">
<div class="col-xs-3">
<img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 45px;"/>
</div>
<div class="row mt8">
<div class="col-xs-6">
<div class="panel panel-default">
<div class="panel-heading">
Service Provider / Creditor:
</div>
<div class="panel-body mb8">
<strong t-field="o.company_id.partner_id and o.company_id.partner_id.name"/><br/>
<span t-if="o.company_id.partner_id.vat">VAT: <span t-field="o.company_id.partner_id.vat"/></span>
<span t-field="o.company_id.partner_id"
t-field-options='{"widget": "contact", "fields": ["address"], "no_marker": true}' />
</div>
<div class="col-xs-9 text-right">
<h4 t-if="o.scheme != 'B2B'"><strong>SEPA DIRECT DEBIT MANDATE</strong></h4>
<h4 t-if="o.scheme == 'B2B'"><strong>SEPA BUSINESS-TO-BUSINESS DIRECT DEBIT MANDATE</strong></h4>
<h5>Reference: <span t-field="o.unique_mandate_reference"/></h5>
</div>
</div>
<div class="row mt8">
<div class="col-xs-6">
<div class="panel panel-default">
<div class="panel-heading">
Service Provider / Creditor:
</div>
</div>
<div class="col-xs-6">
<div class="panel panel-default">
<div class="panel-heading">
Policyholder Service / Debtor:
</div>
<div class="panel-body">
<strong t-field="o.partner_id and o.partner_id.name"/>
<span t-field="o.partner_id"
t-field-options='{"widget": "contact", "fields": ["address"], "no_marker": true}' />
<span t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></span>
</div>
<div class="panel-body mb8">
<strong t-field="o.company_id.partner_id and o.company_id.partner_id.name"/><br/>
<span t-if="o.company_id.partner_id.vat">VAT: <span t-field="o.company_id.partner_id.vat"/></span>
<span t-field="o.company_id.partner_id"
t-field-options='{"widget": "contact", "fields": ["address"], "no_marker": true}' />
</div>
</div>
</div>
<div class="row mt0">
<div class="col-xs-12">
Bank name: <span t-field="o.partner_bank_id.bank_name"/> / BIC: <span t-field="o.partner_bank_id.bank_bic"/><br/>
IBAN: <span t-field="o.partner_bank_id.acc_number"/><br/>
Payment type: <span t-field="o.type"/>
<div class="col-xs-6">
<div class="panel panel-default">
<div class="panel-heading">
Policyholder Service / Debtor:
</div>
<div class="panel-body">
<strong t-field="o.partner_id and o.partner_id.name"/>
<span t-field="o.partner_id"
t-field-options='{"widget": "contact", "fields": ["address"], "no_marker": true}' />
<span t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></span>
</div>
</div>
</div>
<div class="row mt8">
<div class="col-xs-12">
By signing this mandate form, you authorise (A) <span t-field="o.company_id.name"/> to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from <span t-field="o.company_id.name"/>.
</div>
</div>
<div class="row mt0">
<div class="col-xs-12">
Bank name: <span t-field="o.partner_bank_id.bank_name"/> / BIC: <span t-field="o.partner_bank_id.bank_bic"/><br/>
IBAN: <span t-field="o.partner_bank_id.acc_number"/><br/>
Payment type: <span t-field="o.type"/>
</div>
<div class="row mt8">
<div class="col-xs-12 mb32">
<span class="mt0" t-if="o.scheme == 'B2B'">
This mandate is only intended for business-to-business transactions. You are not entitled to a refund from your bank after your account has been debited, but you are entitled to request your bank not to debit your account up until the day on which the payment is due.
Please complete all the fields marked *.
</span>
<span class="mt0" t-if="o.scheme != 'B2B'">
As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank.
A refund must be claimed within 8 weeks starting from the date on which your account was debited.
</span>
</div>
</div>
<div class="row mt8">
<div class="col-xs-12">
By signing this mandate form, you authorise (A) <span t-field="o.company_id.name"/> to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from <span t-field="o.company_id.name"/>.
</div>
<div class="row mt16">
<div class="col-xs-12">
Location and sign: _______________________, at ______ from ____________ from <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y')"/>
</div>
</div>
<div class="row mt8">
<div class="col-xs-12 mb32">
<span class="mt0" t-if="o.scheme == 'B2B'">
This mandate is only intended for business-to-business transactions. You are not entitled to a refund from your bank after your account has been debited, but you are entitled to request your bank not to debit your account up until the day on which the payment is due.
Please complete all the fields marked *.
</span>
<span class="mt0" t-if="o.scheme != 'B2B'">
As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank.
A refund must be claimed within 8 weeks starting from the date on which your account was debited.
</span>
</div>
<div class="row mt32">
<div class="col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
Details regarding the underlying relationship between the Creditor and the Debtor - for information purposes only.
</div>
<div class="row mt16">
<div class="col-xs-12">
Location and sign: _______________________, at ______ from ____________ from <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y')"/>
</div>
</div>
<div class="row mt32">
<div class="col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
Details regarding the underlying relationship between the Creditor and the Debtor - for information purposes only.
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-3">Debtor identification code:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0" t-if="o.scheme != 'B2B'">Write any code number here which you wish to have quoted by your bank.</h6>
<h6 class="mt0" t-if="o.scheme == 'B2B'">For business users: write any code number here which you wish to have quoted by your bank.</h6>
</div>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-3">Debtor identification code:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0" t-if="o.scheme != 'B2B'">Write any code number here which you wish to have quoted by your bank.</h6>
<h6 class="mt0" t-if="o.scheme == 'B2B'">For business users: write any code number here which you wish to have quoted by your bank.</h6>
</div>
<div class="row">
<div class="col-xs-3">Person on whose behalf payment is made:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">Name of the Debtor Reference Party: If you are making a payment in respect of an arrangement between
<span t-field="o.company_id.name"></span> and another person (e.g. where you are paying the other person's bill) please write the other person's name here.</h6>
<h6 class="mt0">
If you are paying on your own behalf, leave blank.
</h6>
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Identification code of the Debtor Reference Party.
</h6>
</div>
<div class="row">
<div class="col-xs-3">Person on whose behalf payment is made:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">Name of the Debtor Reference Party: If you are making a payment in respect of an arrangement between
<span t-field="o.company_id.name"></span> and another person (e.g. where you are paying the other person's bill) please write the other person's name here.</h6>
<h6 class="mt0">
If you are paying on your own behalf, leave blank.
</h6>
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Identification code of the Debtor Reference Party.
</h6>
</div>
</div>
<div class="row">
<div class="col-xs-3">Party on whose behalf the creditor collects the payment:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Name of the Creditor Reference Party: Creditor must complete this section if collecting payment on behalf of another party.
</h6>
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Identification code of the Creditor Reference Party.
</h6>
</div>
<div class="row">
<div class="col-xs-3">Party on whose behalf the creditor collects the payment:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Name of the Creditor Reference Party: Creditor must complete this section if collecting payment on behalf of another party.
</h6>
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Identification code of the Creditor Reference Party.
</h6>
</div>
</div>
<div class="row">
<div class="col-xs-3">In respect of the contract:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Identification number of the underlying contract.
</h6>
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Description of contract.
</h6>
</div>
</div>
<div class="row">
<div class="col-xs-3">In respect of the contract:</div>
<div class="col-xs-9">
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Identification number of the underlying contract.
</h6>
<hr class="mb0" style="border-top: 1px solid #000;"/>
<h6 class="mt0">
Description of contract.
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</div>
</template>
<template id="account_banking_mandate">