diff options
| author | Denis Vermylen (dve) <dve@odoo.com> | 2016-08-25 13:20:37 +0200 |
|---|---|---|
| committer | Denis Vermylen (dve) <dve@odoo.com> | 2016-08-31 17:17:38 +0200 |
| commit | 23f3bde20d4a28edc3b7c39525c89fe72345edec (patch) | |
| tree | 6c5759649e62063cd3206dcef7a45167c6789e95 /addons/payment/data | |
| parent | 1a4af280678d06a11a2f391368c8dc7502789a37 (diff) | |
[FIX] payment: change custom acquirer to work
- custom acquirer auto_confirm field changed to none.
- changed default_acquirer_button to actually display a button
used wire transfer's template (transfer_acquirer_button)
- set dependance to module_payment_transfer as it doesn't work without
and use transfer as provider.
Note: This is a quick fix to make it work, it's quite ugly.
Before the fix it didn't work an people duplicated the transfer
payment acquirer and edited it.
One downside for usability is that the payment icon will be the one
from transfer.
Diffstat (limited to 'addons/payment/data')
| -rw-r--r-- | addons/payment/data/payment_acquirer_data.xml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/addons/payment/data/payment_acquirer_data.xml b/addons/payment/data/payment_acquirer_data.xml index b8f3caed1f0..8532a9443ea 100644 --- a/addons/payment/data/payment_acquirer_data.xml +++ b/addons/payment/data/payment_acquirer_data.xml @@ -2,7 +2,20 @@ <odoo noupdate="1"> <template id="default_acquirer_button"> - <form/> + <form t-if="acquirer" t-att-action="tx_url" method="post" target="_self"> + <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> + <t t-if="return_url"> + <input type="hidden" name="return_url" t-att-value="return_url"/> + </t> + <input type="hidden" name="reference" t-att-value="reference"/> + <input type="hidden" name="amount" t-att-value="amount"/> + <input type="hidden" name="currency" t-att-value="currency.name"/> + <!-- submit --> + <button type="submit" width="100px" t-att-class="submit_class"> + <img t-if="not submit_txt" src="/payment_transfer/static/src/img/transfer_icon.png"/> + <span t-if="submit_txt"><t t-esc="submit_txt"/> <span class="fa fa-long-arrow-right"/></span> + </button> + </form> </template> <record id="payment_acquirer_buckaroo" model="payment.acquirer"> @@ -132,8 +145,10 @@ <record id="payment_acquirer_custom" model="payment.acquirer"> <field name="name">Custom</field> + <field name="auto_confirm">none</field> + <field name="company_id" ref="base.main_company"/> <field name="view_template_id" ref="default_acquirer_button"/> - <field name="module_id" ref="base.module_payment"/> + <field name="module_id" ref="base.module_payment_transfer"/> <field name="description" type="html"> <p> A generic acquirer payment acquirer. |
