Skip to content

Commit

Permalink
[IMP] payment_mercadopago: New credential fields
Browse files Browse the repository at this point in the history
Add two fields that will be required in the next version of the module.
  • Loading branch information
Bruno-Zanotti authored and jjscarafia committed Apr 27, 2021
1 parent e1af69c commit fdbdfda
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion payment_mercadopago/__manifest__.py
Expand Up @@ -21,7 +21,7 @@
'name': 'MercadoPago Payment Acquirer',
'category': 'Hidden',
'summary': 'Payment Acquirer: MercadoPago Implementation',
'version': '13.0.1.0.0',
'version': '13.0.1.1.0',
'author': 'Moldeo Interactive - www.moldeo.coop,ADHOC SA, AITIC S.A.S',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
Expand Down
6 changes: 6 additions & 0 deletions payment_mercadopago/models/payment_acquirer.py
Expand Up @@ -29,6 +29,12 @@ class AcquirerMercadopago(models.Model):
'MercadoPago Secret Key',
required_if_provider='mercadopago',
)
mercadopago_publishable_key = fields.Char(
'MercadoPago Public Key'
)
mercadopago_access_token = fields.Char(
'MercadoPago Access Token'
)

def _get_feature_support(self):
res = super(AcquirerMercadopago, self)._get_feature_support()
Expand Down
12 changes: 11 additions & 1 deletion payment_mercadopago/views/payment_acquirer_views.xml
Expand Up @@ -14,11 +14,21 @@
<field name="mercadopago_secret_key"/>
<!-- <field name="mercadopago_description" attrs="{'required': [('provider', '=', 'mercadopago')]}"/> -->
<field name="mercadopago_item_title" attrs="{'required': [('provider', '=', 'mercadopago')]}"/>
<field name="mercadopago_publishable_key"/>
<field name="mercadopago_access_token" password="True"/>
</group>
<!-- <field name="mercadopago_generic_message" attrs="{'required': [('mercadopago_description', '=', 'generic_message'), ('provider', '=', 'mercadopago')], 'invisible': [('mercadopago_description', '!=', 'generic_message')]}"/> -->
<!-- TODO terminar de implementar ipn -->
<!-- <label for="mercadopago_client_id" string="If you also want to receive notifications by ipn go to:"/>
<a href="https://www.mercadopago.com/mla/herramientas/notificaciones" target="_blank">https://www.mercadopago.com/mla/herramientas/notificaciones</a> -->
</group>
</xpath>
<xpath expr='//group[@name="acquirer"]' position='after'>
<p class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('provider', '!=', 'mercadopago')]}">
Los campos <b>mercadopago_publishable_key</b> y <b>mercadopago_access_token</b> serán necesarios para la próxima actualización del módulo.
<br/>
Les avisaremos con tiempo pero si quieren ir adelantando pueden obtenerlos
<a colspan="2" href="https://www.mercadopago.com/mla/account/credentials" target="_blank">aquí</a>.
</p>
</xpath>
</field>
</record>
Expand Down

0 comments on commit fdbdfda

Please sign in to comment.