Skip to content

Commit

Permalink
Merge branch 'hotfix/3.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alima Grine committed Mar 29, 2023
2 parents f650830 + 865a30b commit 36c432f
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 49 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
3.0.1, 2023-03-29
=============
- Bug fix: Fix arguments of the method _get_default_payment_method_id.
- Update list of supported payment means.
- Update list of supported currencies.

3.0.0, 2022-12-15
=============
- New plugin for Odoo 16.
2 changes: 1 addition & 1 deletion COPYING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2017-2022 Lyra Network.
Copyright © 2017-2023 Lyra Network.

Lyra Collect plugin for Odoo is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
2 changes: 1 addition & 1 deletion payment_lyra/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{
'name': 'Lyra Collect Payment Provider',
'version': '3.0.0',
'version': '3.0.1',
'summary': 'Accept payments with Lyra Collect secure payment gateway.',
'category': 'Accounting/Payment Providers',
'author': 'Lyra Network',
Expand Down
2 changes: 1 addition & 1 deletion payment_lyra/data/payment_provider_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</record>

<record id="payment_method_lyra" model="account.payment.method">
<field name="name">Lyra Collect</field>
<field name="name"><![CDATA[Lyra Collect]]></field>
<field name="code">lyra</field>
<field name="payment_type">inbound</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion payment_lyra/data/payment_provider_data_multi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</record>

<record id="payment_method_lyramulti" model="account.payment.method">
<field name="name">Lyra Collect Multi</field>
<field name="name"><![CDATA[Lyra Collect Multi]]></field>
<field name="code">lyramulti</field>
<field name="payment_type">inbound</field>
</record>
Expand Down
93 changes: 50 additions & 43 deletions payment_lyra/helpers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'LANGUAGE': 'en',

'GATEWAY_VERSION': 'V2',
'PLUGIN_VERSION': '3.0.0',
'PLUGIN_VERSION': '3.0.1',
'CMS_IDENTIFIER': 'Odoo_16',
}

Expand Down Expand Up @@ -70,35 +70,37 @@
'ALLOBEBE_CDX': u'Carte Cadeau Allobébé',
'ALLOBEBE_CDX_SB': u'Carte Cadeau Allobébé (sandbox)',
'APETIZ': u'Apetiz',
'AUCHAN': u'Carte Auchan',
'AUCHAN_SB': u'Carte Auchan (sandbox)',
'APPLE_PAY': u'Apple Pay',
'AUCHAN': u'Carte Auchan',
'AUCHAN_SB': u'Carte Auchan (sandbox)',
'AURORE-MULTI': u'Cpay Aurore',
'BANCONTACT': u'Bancontact Mistercash',
'BIZZBEE_CDX': u'Carte Cadeau Bizzbee',
'BIZZBEE_CDX_SB': u'Carte Cadeau Bizzbee (sandbox)',
'BOULANGER': u'Carte b+',
'BANCONTACT': u'Bancontact Mistercash',
'BIZUM': u'Bizum',
'BIZZBEE_CDX': u'Carte Cadeau Bizzbee',
'BIZZBEE_CDX_SB': u'Carte Cadeau Bizzbee (sandbox)',
'BOULANGER': u'Carte b+',
'BOULANGER_SB': u'Carte b+ (sandbox)',
'BRICE_CDX': u'Carte Cadeau Brice',
'BRICE_CDX_SB': u'Carte Cadeau Brice (sandbox)',
'BRICE_CDX': u'Carte Cadeau Brice',
'BRICE_CDX_SB': u'Carte Cadeau Brice (sandbox)',
'BUT': u'But',
'CA_DO_CARTE': u'CA DO Carte',
'CA_DO_CARTE': u'CA DO Carte',
'CABAL': u'Cabal',
'CARNET': u'Carnet',
'CARNET': u'Carnet',
'CHQ_DEJ': u'Chèque Déjeuner',
'COM_BARRY_CDX': u'Carte Cadeau Comtesse du Barry',
'COM_BARRY_CDX_SB': u'Carte Cadeau Comtesse du Barry (sandbox)',
'CONECS': u'Conecs',
'COM_BARRY_CDX': u'Carte Cadeau Comtesse du Barry',
'COM_BARRY_CDX_SB': u'Carte Cadeau Comtesse du Barry (sandbox)',
'CONECS': u'Conecs',
'CONFORAMA': u'Conforama',
'CORA': u'Cora',
'CORA': u'Cora',
'CORA_BLANCHE': u'Cora blanche',
'CORA_PREM': u'Cora Visa Premier',
'CORA_PREM': u'Cora Visa Premier',
'CORA_VISA': u'Cora Visa',
'CVCO': u'Chèque-Vacances Connect',
'DINERS': u'Diners',
'CVCO': u'Chèque-Vacances Connect',
'DINERS': u'Diners',
'DISCOVER': u'Discover',
'ECCARD': u'EC Card',
'EDENRED': u'Ticket Restaurant',
'EDENRED_EC': u'Ticket EcoCheque',
'EDENRED': u'Ticket Restaurant',
'EDENRED_EC': u'Ticket EcoCheque',
'EDENRED_SC': u'Ticket Sport & Culture',
'EDENRED_TC': u'Ticket Compliments',
'EDENRED_TR': u'Ticket Restaurant',
Expand All @@ -110,29 +112,33 @@
'GEMO_CDX': u'Carte Cadeau Gémo',
'GEMO_CDX_SB': u'Carte Cadeau Gémo (sandbox)',
'GIROPAY': u'Giropay',
'GOOGLEPAY': u'Google Pay',
'HIPER': u'Hiper',
'HIPERCARD': u'Hipercard',
'HIPER': u'Hiper',
'HIPERCARD': u'Hipercard',
'IDEAL': u'iDEAL',
'ILLICADO': u'Carte Illicado',
'ILLICADO_SB': u'Carte Illicado (sandbox)',
'JCB': u'JCB',
'IP_WIRE': u'Virement SEPA',
'IP_WIRE_INST': u'Virement SEPA Instantané',
'JCB': u'JCB',
'JOUECLUB_CDX': u'Carte Cadeau Joué Club',
'JOUECLUB_CDX_SB': u'Carte Cadeau Joué Club (sandbox)',
'JULES_CDX': u'Carte Cadeau Jules',
'JULES_CDX_SB': u'Carte Cadeau Jules (sandbox)',
'LEROY-MERLIN': u'Carte Maison Financement',
'LEROY-MERLIN_SB': u'Carte Maison Financement (sandbox)',
'MASTERPASS': u'MasterPass',
'MC_CORDOBESA': u'Mastercard Cordobesa',
'JOUECLUB_CDX_SB': u'Carte Cadeau Joué Club (sandbox)',
'JULES_CDX': u'Carte Cadeau Jules',
'JULES_CDX_SB': u'Carte Cadeau Jules (sandbox)',
'LECLERC': u'Carte Reglo',
'LEROY-MERLIN': u'Carte Maison Financement',
'LEROY-MERLIN_SB': u'Carte Maison Financement (sandbox)',
'MASTERPASS': u'MasterPass',
'MC_CORDOBESA': u'Mastercard Cordobesa',
'MULTIBANCO': u'Multibanco',
'MYBANK': u'MyBank',
'MYBANK': u'MyBank',
'NARANJA': u'Naranja',
'NORAUTO': u'Carte Norauto option Financement',
'NORAUTO_SB': u'Carte Norauto option Financement (sandbox)',
'NORAUTO': u'Carte Norauto option Financement',
'NORAUTO_SB': u'Carte Norauto option Financement (sandbox)',
'ONEY_10X_12X': u'Paiement en 10 ou 12 fois Oney',
'ONEY_3X_4X': u'Paiement en 3 ou 4 fois Oney',
'ONEY_ENSEIGNE': u'Cartes enseignes Oney',
'PAYDIREKT': u'Paydirekt',
'ONEY_PAYLATER': u'Pay Later Oney',
'PAYDIREKT': u'Paydirekt',
'PAYPAL': u'PayPal',
'PAYPAL_SB': u'PayPal Sandbox',
'PICWIC': u'Carte Picwic',
Expand All @@ -141,13 +147,15 @@
'POSTFINANCE_EFIN': u'PostFinance E-Finance',
'PRESTO': u'Presto',
'PRZELEWY24': u'Przelewy24',
'SDD': u'SEPA direct debit',
'S-MONEY': u'S-money',
'SCT': u'Virement SEPA',
'SDD': u'SEPA direct debit',
'SODEXO': u'Pass Restaurant',
'SOFORT_BANKING': u'Sofort',
'SOROCRED': u'Sorocred',
'SOFORT_BANKING': u'Sofort',
'SOROCRED': u'Sorocred',
'UNION_PAY': u'UnionPay',
'VILLAVERDE': u'Carte Cadeau VillaVerde',
'VILLAVERDE_SB': u'Carte Cadeau VillaVerde (sandbox)',
'VILLAVERDE': u'Carte Cadeau VillaVerde',
'VILLAVERDE_SB': u'Carte Cadeau VillaVerde (sandbox)',
'WECHAT': u'WeChat Pay',
}

Expand All @@ -158,9 +166,8 @@
['EUR', '978', 2],
['GBP', '826', 2],
['JPY', '392', 0],
['DKK', '208', 2],
['NOK', '578', 2],
['PLN', '985', 2],
['SEK', '752', 2],
['PLN', '985', 2],
['SEK', '752', 2],
['USD', '840', 2],
]
4 changes: 2 additions & 2 deletions payment_lyra/models/payment_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ def lyra_form_generate_values(self, values):
def lyra_get_form_action_url(self):
return self.lyra_gateway_url

def _get_default_payment_method_id(self):
def _get_default_payment_method_id(self, code):
self.ensure_one()
if self.code != 'lyra' and self.code != 'lyramulti':
return super()._get_default_payment_method_id()
return super()._get_default_payment_method_id(self, code)

if self.code == 'lyra':
return self.env.ref('payment_lyra.payment_method_lyra').id
Expand Down

0 comments on commit 36c432f

Please sign in to comment.