| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<record id="payment_provider_form" model="ir.ui.view"> |
| 5 |
<field name="name">Mercado Pago Provider Form</field> |
| 6 |
<field name="model">payment.provider</field> |
| 7 |
<field name="inherit_id" ref="payment.payment_provider_form"/> |
| 8 |
<field name="arch" type="xml"> |
| 9 |
<group name="provider_credentials" position="inside"> |
| 10 |
<group invisible="code != 'mercado_pago'"> |
| 11 |
<field |
| 12 |
string="Account Country" |
| 13 |
name="mercado_pago_account_country_id" |
| 14 |
required="code == 'mercado_pago' and state != 'disabled'" |
| 15 |
readonly="mercado_pago_access_token and mercado_pago_is_oauth_supported" |
| 16 |
options="{'no_create': True}" |
| 17 |
/> |
| 18 |
<label |
| 19 |
for="mercado_pago_access_token" |
| 20 |
invisible="not mercado_pago_access_token and mercado_pago_is_oauth_supported" |
| 21 |
/> |
| 22 |
<div |
| 23 |
class="o_row" |
| 24 |
invisible="not mercado_pago_access_token and mercado_pago_is_oauth_supported" |
| 25 |
> |
| 26 |
<field |
| 27 |
string="Access Token" |
| 28 |
name="mercado_pago_access_token" |
| 29 |
readonly="mercado_pago_is_oauth_supported" |
| 30 |
password="True" |
| 31 |
/> |
| 32 |
<button |
| 33 |
string="Disconnect Your Mercado Pago Account" |
| 34 |
type="object" |
| 35 |
name="action_reset_credentials" |
| 36 |
confirm="Are you sure you want to disconnect?" |
| 37 |
invisible="not mercado_pago_is_oauth_supported" |
| 38 |
class="btn-secondary ms-2" |
| 39 |
/> |
| 40 |
</div> |
| 41 |
</group> |
| 42 |
</group> |
| 43 |
<group name="provider_credentials" position="after"> |
| 44 |
<div |
| 45 |
invisible="code != 'mercado_pago' or (mercado_pago_access_token and mercado_pago_public_key) or not mercado_pago_is_oauth_supported" |
| 46 |
> |
| 47 |
<div |
| 48 |
class="alert alert-warning mt-2" |
| 49 |
role="alert" |
| 50 |
invisible="not mercado_pago_access_token and not mercado_pago_public_key" |
| 51 |
> |
| 52 |
You must renew your connection to Mercado Pago in order to enable the new |
| 53 |
Card payment method experience, which allows saving payment details for |
| 54 |
recurring payments. |
| 55 |
</div> |
| 56 |
<button |
| 57 |
string="Connect" |
| 58 |
type="object" |
| 59 |
name="action_start_onboarding" |
| 60 |
class="btn-primary" |
| 61 |
invisible="mercado_pago_access_token and not mercado_pago_public_key" |
| 62 |
colspan="2" |
| 63 |
/> |
| 64 |
</div> |
| 65 |
</group> |
| 66 |
</field> |
| 67 |
</record> |
| 68 |
|
| 69 |
</odoo> |