Commit 1f07c385 authored by santi's avatar santi
Browse files

New fields for payment methods

parent 6e831d39
......@@ -9,5 +9,11 @@ _logger = logging.getLogger(__name__)
class ResPartner(models.Model):
_inherit = 'res.partner'
spark_id = fields.Char('Spark User Id', help="The Spark User Id", translate=False)
faircoin_address = fields.Char('FairCoin user address', help="The FairCoin address for the user", translate=False)
boc_id = fields.Char('BotC', help='The Bank of the Commons User Id', translate=False)
betabank_id = fields.Char('Betabank User Id', help="The user id in betabank to print in the invoice", translate=False)
prefered_payment = fields.Selection([('betabank','BetaBank'),('faircoin','FairCoin address'), ('boc','Bank of the Commons'), ('spark','Spark')],
help="Your prefered payment method",
default="betabank")
......@@ -7,7 +7,11 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='website']" position="after">
<field name="prefered_payment" widget="selection"/>
<field name="betabank_id" groups="account.group_account_user" />
<field name="boc_id" groups="account.group_account_user" />
<field name="faircoin_address" groups="account.group_account_user" />
<field name="spark_id" groups="account.group_account_user" />
<field name="lang"/>
<label for="vat"/>
<div name="vat_info2">
......
......@@ -5,17 +5,35 @@
<xpath expr="//div[@class='col-xs-4 pull-right']" position="before">
<div class="pull-left">
<h4>Payment instructions:</h4>
<p>Name: Betacoop eG<br/>
IBAN: DE41 4306 0967 1152 3659 00<br/>
BIC: GENODEM1GLS<br/>
Bank: GLS Gemeinschaftsbank eG<br/>
Reference: <span t-field="o.user_id.partner_id.betabank_id"/>/<span t-field="o.number"/></p>
<p>Please, is very important you write the reference in the bank transfer. Thank you for your attention.</p>
<t t-if="o.user_id.partner_id.prefered_payment == 'betabank'">
<p>Name: Betacoop eG<br/>
IBAN: DE41 4306 0967 1152 3659 00<br/>
BIC: GENODEM1GLS<br/>
Bank: GLS Gemeinschaftsbank eG<br/>
Reference: <span t-field="o.user_id.partner_id.betabank_id"/>/<span t-field="o.number"/></p>
<p>Please, is very important you write the reference in the bank transfer. Thank you for your attention.</p>
</t>
<t t-if="o.user_id.partner_id.prefered_payment == 'boc'">
<p>Name: Bank of the Commons<br/>
IBAN: IT99 9999 9999 9999 9999 000<br/>
BIC: BOTC<br/>
Bank: Bank of the Commons<br/>
Reference: <span t-field="o.user_id.partner_id.boc_id"/>/<span t-field="o.number"/></p>
</t>
<t t-if="o.user_id.partner_id.prefered_payment == 'spark'">
<p>Send the amount to Spark <span t-field="o.user_id.partner_id.spark_id"/></p>
</t>
<t t-if="o.user_id.partner_id.prefered_payment == 'faircoin'">
<p>Send the amount in FairCoin to <span t-field="o.user_id.partner_id.faircoin_address"/></p>
</t>
</div>
</xpath>
<!--
<xpath expr="//div/div[@class='col-xs-5 col-xs-offset-7']" position="inside">
<div class="pull-left" t-if="o.partner_id.vat">TIN: <span t-field="o.partner_id.vat"/></div>
</xpath>
-->
</template>
<template id="report_external_layout_extends" inherit_id="report.external_layout_header">
<xpath expr="//div/div/div[@t-field='company.partner_id']" position="before">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment