[IMP] Add english lang when a different lang is printed

This commit is contained in:
Antonio Espinosa
2016-07-06 14:56:38 +02:00
parent e275cdf3ae
commit a19034bb71

View File

@@ -3,6 +3,7 @@
<template id="sepa_direct_debit_mandate_document">
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})" />
<t t-set="native_langs" t-value="('en_US', 'en_GB')" />
<div class="page">
<style type="text/css">
.under-line{
@@ -17,41 +18,104 @@
p{
font-size: 8px;
}
.native_lang{
font-style: italic;
}
.native_lang_small{
font-size: 0.8em;
}
</style>
<div class="row mt0">
<div class="col-xs-3">
<img t-if="doc.company_id.logo" t-att-src="'data:image/png;base64,%s' % doc.company_id.logo" style="max-height: 45px;"/>
</div>
<div class="col-xs-12 text-center">
<h4 t-if="doc.scheme != 'B2B'"><strong>Sepa Direct Debit Mandate</strong></h4>
<h4 t-if="doc.scheme == 'B2B'"><strong>Sepa Business-To-Business Direct debit Mandate</strong></h4>
<h4 t-if="doc.scheme != 'B2B'">
<strong>Sepa Direct Debit Mandate</strong>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'Sepa Direct Debit Mandate'"/>
</t>
</h4>
<h4 t-if="doc.scheme == 'B2B'">
<strong>Sepa Business-To-Business Direct debit Mandate</strong>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'Sepa Business-To-Business Direct debit Mandate'"/>
</t>
</h4>
</div>
</div>
<div class="row mt8">
<div class="col-xs-12">
<div class="panel panel-default">
<span class="col-xs-12 text-right" style="font-size:8px;">To be completed by the creditor</span>
<div class="col-xs-12 text-right" style="font-size:8px;">
To be completed by the creditor
<t t-if="doc.partner_id.lang not in native_langs">
<span class="native_lang" t-esc="'(To be completed by the creditor)'"/>
</t>
</div>
<div class="panel-body mb8">
<div class="col-xs-12"><em>Mandate Reference:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.unique_mandate_reference"/></div>
<div class="col-xs-12"><em>Identifier:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.sepa_creditor_identifier"/></div>
<div class="col-xs-12"><em>Creditor's Name:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.partner_id.name"/></div>
<div class="col-xs-12"><em>Address:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.partner_id.street"/></div>
<div class="col-xs-12"><em>Postal Code - City - Town:</em></div>
<div class="col-xs-12">
<em>Mandate Reference:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Mandate Reference)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.unique_mandate_reference"/></div>
<div class="col-xs-12">
<em>Identifier:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Identifier)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.sepa_creditor_identifier"/></div>
<div class="col-xs-12">
<em>Creditor's Name:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Creditor\'s Name)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.partner_id.name"/></div>
<div class="col-xs-12">
<em>Address:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Address)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.partner_id.street"/></div>
<div class="col-xs-12">
<em>Postal Code - City - Town:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Postal Code - City - Town)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt8">
<span t-field="doc.company_id.partner_id.zip"/> -
<span t-field="doc.company_id.partner_id.city"/> -
<span t-field="doc.company_id.partner_id.state_id"/>
</div>
<div class="col-xs-12"><em>Country:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.partner_id.country_id"/></div>
<div class="col-xs-12">
<em>Country:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Country)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.company_id.partner_id.country_id"/></div>
</div>
</div>
</div>
</div>
<div class="row mt0">
<div class="col-xs-12">
<p>By signing this mandate form, you authorise (A) <strong t-if="doc.scheme == 'B2B'"><span t-field="doc.company_id.name"/></strong>
<p>By signing this mandate form, you authorise (A) <strong t-if="doc.scheme == 'B2B'"> <span t-field="doc.company_id.name"/> </strong>
to send instructions to your bank to debit your account and (B) your bank to
debit your account in accordance with the instructions from <strong t-if="doc.scheme == 'B2B'"><span t-field="doc.company_id.name"/></strong>.
debit your account in accordance with the instructions from <strong t-if="doc.scheme == 'B2B'"> <span t-field="doc.company_id.name"/> </strong>.
<t t-if="doc.partner_id.lang not in native_langs">
<br/>
<span class="native_lang" t-esc="'(By signing this mandate form, you authorise (A) '"/>
<t t-if="doc.scheme == 'B2B'"> <span class="native_lang" t-field="doc.company_id.name"/> </t>
<span class="native_lang" t-esc="' to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from '"/>
<t t-if="doc.scheme == 'B2B'"> <span class="native_lang" t-field="doc.company_id.name"/> </t>.)
</t>
</p>
</div>
</div>
@@ -62,39 +126,112 @@
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.
<t t-if="doc.partner_id.lang not in native_langs">
<br/>
<span class="native_lang" t-esc="'(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.)'"/>
</t>
</p>
<p t-if="doc.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.
<t t-if="doc.partner_id.lang not in native_langs">
<br/>
<span class="native_lang" t-esc="'(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.)'"/>
</t>
</p>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="panel panel-default">
<span class="col-xs-12 text-right" style="font-size:8px;">To be completed by the debtor</span>
<div class="col-xs-12 text-right" style="font-size:8px;">
To be completed by the debtor
<t t-if="doc.partner_id.lang not in native_langs">
<span class="native_lang" t-esc="'(To be completed by the debtor)'"/>
</t>
</div>
<div class="panel-body">
<div class="col-xs-12"><em>Debtor's Name:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_id"/></div>
<div class="col-xs-12"><em>Address of the Debtor:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_id.street"/></div>
<div class="col-xs-12"><em>Postal Code - City - Town:</em></div>
<div class="col-xs-12">
<em>Debtor's Name:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Debtor\'s Name)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_id"/></div>
<div class="col-xs-12">
<em>Address of the Debtor:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Address of the Debtor)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_id.street"/></div>
<div class="col-xs-12">
<em>Postal Code - City - Town:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Postal Code - City - Town)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4">
<span t-field="doc.partner_id.zip"/> -
<span t-field="doc.partner_id.city"/> -
<span t-field="doc.partner_id.state_id"/>
</div>
<div class="col-xs-12"><em>Country of the debtor:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_id.country_id"/></div>
<div class="col-xs-12"><em>Swift BIC (up to 8 or 11 characteres):</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_bank_id.bank_bic"/></div>
<div class="col-xs-12"><em>Account Number - IBAN:</em></div><div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_bank_id.acc_number"/></div>
<div class="col-xs-12"><em>Type of payment:</em></div>
<div class="col-xs-10 col-xs-offset-2 mt4">
<input type="checkbox" t-att-checked="doc.type=='recurrent' or None"> Recurrent</input>
<input type="checkbox" t-att-checked="doc.type=='oneoff' or None"> One-Off</input>
<div class="col-xs-12">
<em>Country of the debtor:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Country of the debtor)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_id.country_id"/></div>
<div class="col-xs-12">
<em>Swift BIC (up to 8 or 11 characteres):</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Swift BIC, up to 8 or 11 characteres)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_bank_id.bank_bic"/></div>
<div class="col-xs-12">
<em>Account Number - IBAN:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Account Number - IBAN)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt4"><span t-field="doc.partner_bank_id.acc_number"/></div>
<div class="col-xs-12">
<em>Type of payment:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Type of payment)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 mt4">
<input type="checkbox" t-att-checked="doc.type=='recurrent' or None">
Recurrent
<t t-if="doc.partner_id.lang not in native_langs">
<span class="native_lang native_lang_small" t-esc="'(Recurrent)'"/>
</t>
</input><br/>
<input type="checkbox" t-att-checked="doc.type=='oneoff' or None">
One-Off
<t t-if="doc.partner_id.lang not in native_langs">
<span class="native_lang native_lang_small" t-esc="'(One-Off)'"/>
</t>
</input>
</div>
<div class="col-xs-12">
<em>Date - Location:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Date - Location)'"/>
</t>
</div>
<div class="col-xs-12"><em>Date - Location:</em></div>
<div class="col-xs-10 col-xs-offset-2 under-line mt16"/>
<div class="col-xs-12"><em>Signature of the debtor:</em></div>
<div class="col-xs-12">
<em>Signature of the debtor:</em>
<t t-if="doc.partner_id.lang not in native_langs">
<br/><span class="native_lang native_lang_small" t-esc="'(Signature of the debtor)'"/>
</t>
</div>
<div class="col-xs-10 col-xs-offset-2 under-line mt16"/>
</div>
</div>
@@ -102,10 +239,22 @@
</div>
<div class="row">
<div class="col-xs-12 text-center">
<p t-if="doc.scheme != 'B2B'">ALL GAPS ARE MANDATORY. ONCE THIS MANDATE HAS BEEN SIGNED MUST BE SENT TO CREDITOR FOR STORAGE.</p>
<p t-if="doc.scheme == 'B2B'">ALL GAPS ARE MANDATORY. ONCE THIS MANDATE HAS BEEN SIGNED MUST BE SENT TO CREDITOR FOR STORAGE.
<p t-if="doc.scheme != 'B2B'">
ALL GAPS ARE MANDATORY. ONCE THIS MANDATE HAS BEEN SIGNED MUST BE SENT TO CREDITOR FOR STORAGE.
<t t-if="doc.partner_id.lang not in native_langs">
<br/>
<span class="native_lang" t-esc="'(ALL GAPS ARE MANDATORY. ONCE THIS MANDATE HAS BEEN SIGNED MUST BE SENT TO CREDITOR FOR STORAGE.)'"/>
</t>
</p>
<p t-if="doc.scheme == 'B2B'">
ALL GAPS ARE MANDATORY. ONCE THIS MANDATE HAS BEEN SIGNED MUST BE SENT TO CREDITOR FOR STORAGE.
NEVERTHELESS, THE BANK OF DEBTOR REQUIRES DEBTORS AUTHORIZATION BEFORE DEBITING B2B DIRECT DEBITS IN THE ACCOUNT.
THE DEBTOR WILL BE ABLE TO MANAGE THE MENTIONED AUTHORIZATION THROUGH THE MEANS PROVIDED BY HIS BANK.</p>
THE DEBTOR WILL BE ABLE TO MANAGE THE MENTIONED AUTHORIZATION THROUGH THE MEANS PROVIDED BY HIS BANK.
<t t-if="doc.partner_id.lang not in native_langs">
<br/>
<span class="native_lang" t-esc="'(ALL GAPS ARE MANDATORY. ONCE THIS MANDATE HAS BEEN SIGNED MUST BE SENT TO CREDITOR FOR STORAGE. NEVERTHELESS, THE BANK OF DEBTOR REQUIRES DEBTORS AUTHORIZATION BEFORE DEBITING B2B DIRECT DEBITS IN THE ACCOUNT. THE DEBTOR WILL BE ABLE TO MANAGE THE MENTIONED AUTHORIZATION THROUGH THE MEANS PROVIDED BY HIS BANK.)'"/>
</t>
</p>
</div>
</div>
</div>