Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alima Grine committed May 30, 2024
2 parents c3d379d + 3da9035 commit c9ad5ad
Show file tree
Hide file tree
Showing 16 changed files with 270 additions and 154 deletions.
20 changes: 2 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
3.0.3, 2023-09-14
4.0.0, 2024-05-30:
=============
- Bug Fix: Fix client return to shop in case of multi-site.
- Update list of supported payment means.

3.0.2, 2023-06-06
=============
- Add documentation management field.
- Minor code fixes.

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.
- New plugin for Odoo 17.
2 changes: 1 addition & 1 deletion COPYING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2017-2023 Lyra Network.
Copyright © 2024 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
15 changes: 15 additions & 0 deletions payment_lyra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@

from . import controllers
from . import models

from .helpers import constants
from odoo.addons.payment import setup_provider, reset_payment_provider

def post_init_hook(env):
setup_provider(env, 'lyra')

if constants.LYRA_PLUGIN_FEATURES.get('multi') == True:
setup_provider(env, 'lyramulti')

def uninstall_hook(env):
reset_payment_provider(env, 'lyra')

if constants.LYRA_PLUGIN_FEATURES.get('multi') == True:
reset_payment_provider(env, 'lyramulti')
6 changes: 4 additions & 2 deletions 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.3',
'version': '4.0.0',
'summary': 'Accept payments with Lyra Collect secure payment gateway.',
'category': 'Accounting/Payment Providers',
'author': 'Lyra Network',
Expand All @@ -19,10 +19,12 @@
'data': [
'views/payment_provider_views.xml',
'views/payment_lyra_templates.xml',
'data/payment_icon_data.xml',
'data/payment_method_data.xml',
'data/payment_provider_data.xml',
'security/ir.model.access.csv',
],
'post_init_hook': 'post_init_hook',
'uninstall_hook': 'uninstall_hook',
'images': ['static/description/icon.png'],
'application': True,
'installable': True
Expand Down
31 changes: 0 additions & 31 deletions payment_lyra/data/payment_icon_data.xml

This file was deleted.

148 changes: 148 additions & 0 deletions payment_lyra/data/payment_method_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
# Copyright © Lyra Network.
# This file is part of Lyra Collect plugin for Odoo. See COPYING.md for license details.
#
# Author: Lyra Network (https://www.lyra.com)
# Copyright: Copyright © Lyra Network
# License: http://www.gnu.org/licenses/agpl.html GNU Affero General Public License (AGPL v3)
-->

<odoo noupdate="1">
<record id="payment_method_lyra" model="payment.method">
<field name="name"><![CDATA[Lyra Collect]]></field>
<field name="code">lyra</field>
<field name="sequence">1000</field>
<field name="image" type="base64" file="payment/static/img/card.png" />
<field name="support_tokenization">False</field>
<field name="support_express_checkout">False</field>
<field name="support_refund"></field>
</record>

<record id="payment_method_lyramulti" model="payment.method">
<field name="name"><![CDATA[Lyra Collect Multi]]></field>
<field name="code">lyramulti</field>
<field name="sequence">1000</field>
<field name="image" type="base64" file="payment/static/img/card.png" />
<field name="support_tokenization">False</field>
<field name="support_express_checkout">False</field>
<field name="support_refund"></field>
</record>

<record id="payment_method_lyracb" model="payment.method">
<field name="name">CB</field>
<field name="code">lyracb</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment_lyra/static/src/img/cb.png" />
</record>

<record id="payment_method_lyravisa" model="payment.method">
<field name="name">Visa</field>
<field name="code">lyravisa</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment/static/img/visa.png" />
</record>

<record id="payment_method_lyramastercard" model="payment.method">
<field name="name">Mastercard</field>
<field name="code">lyramastercard</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment/static/img/mastercard.png" />
</record>

<record id="payment_method_lyraamex" model="payment.method">
<field name="name">American Express</field>
<field name="code">lyraamex</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment/static/img/amex.png" />
</record>

<record id="payment_method_lyraecardtebleue" model="payment.method">
<field name="name">e-Carte Bleue</field>
<field name="code">lyraecartebleue</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">False</field>
<field name="image" type="base64" file="payment_lyra/static/src/img/e-cartebleue.png" />
</record>

<record id="payment_method_lyravisaelectron" model="payment.method">
<field name="name">Visa Electron</field>
<field name="code">lyravisaelectron</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">False</field>
<field name="image" type="base64" file="payment_lyra/static/src/img/visa_electron.png" />
</record>

<record id="payment_method_lyravpay" model="payment.method">
<field name="name">V PAY</field>
<field name="code">lyravpay</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">False</field>
<field name="image" type="base64" file="payment/static/img/vpay.png" />
</record>

<record id="payment_method_lyraapplepay" model="payment.method">
<field name="name">Apple Pay</field>
<field name="code">lyraapplepay</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">False</field>
<field name="image" type="base64" file="payment/static/img/apple_pay.png" />
</record>

<record id="payment_method_lyrapaypal" model="payment.method">
<field name="name">PayPal</field>
<field name="code">lyrapaypal</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyra')" />
<field name="sequence">1000</field>
<field name="active">False</field>
<field name="image" type="base64" file="payment/static/img/paypal.png" />
</record>

<record id="payment_method_lyramulticb" model="payment.method">
<field name="name">CB</field>
<field name="code">lyramulticb</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyramulti')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment_lyra/static/src/img/cb.png" />
</record>

<record id="payment_method_lyramultivisa" model="payment.method">
<field name="name">Visa</field>
<field name="code">lyramultivisa</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyramulti')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment/static/img/visa.png" />
</record>

<record id="payment_method_lyramultimastercard" model="payment.method">
<field name="name">Mastercard</field>
<field name="code">lyramultimastercard</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyramulti')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment/static/img/mastercard.png" />
</record>

<record id="payment_method_lyramultiamex" model="payment.method">
<field name="name">American Express</field>
<field name="code">lyramultiamex</field>
<field name="primary_payment_method_id" eval="ref('payment_method_lyramulti')" />
<field name="sequence">1000</field>
<field name="active">True</field>
<field name="image" type="base64" file="payment/static/img/amex.png" />
</record>
</odoo>
20 changes: 6 additions & 14 deletions payment_lyra/data/payment_provider_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
<data noupdate="1">
<record id="payment_provider_lyra" model="payment.provider">
<field name="name"><![CDATA[Lyra Collect - Standard payment]]></field>
<field name="display_as">Payment by credit card</field>
<field name="payment_icon_ids"
eval="[(6, 0, [
ref('payment_lyra.payment_icon_cc_lyracb'),
ref('payment_lyra.payment_icon_cc_lyravisa'),
ref('payment_lyra.payment_icon_cc_lyramastercard'),
])]"/>
<field name="image" type="base64" file="payment_lyra/static/src/img/logo.png" />
<field name="image_128" type="base64" file="payment_lyra/static/src/img/logo.png" />
<field name="code">lyra</field>
Expand All @@ -34,13 +27,12 @@
<field name="lyra_redirect_enabled">0</field>
<field name="lyra_redirect_success_timeout">5</field>
<field name="lyra_redirect_error_timeout">5</field>
<field name="lyra_return_mode">GET</field>
</record>

<record id="payment_method_lyra" model="account.payment.method">
<field name="name"><![CDATA[Lyra Collect]]></field>
<field name="code">lyra</field>
<field name="payment_type">inbound</field>
<field name="lyra_return_mode">POST</field>
<field name="payment_method_ids"
eval="[Command.set([
ref('payment_lyra.payment_method_lyra'),
])]"
/>
</record>
</data>

Expand Down
20 changes: 6 additions & 14 deletions payment_lyra/data/payment_provider_data_multi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
<data noupdate="1">
<record id="payment_provider_lyramulti" model="payment.provider">
<field name="name"><![CDATA[Lyra Collect - Payment in installments]]></field>
<field name="display_as">Payment by credit card in installments</field>
<field name="payment_icon_ids"
eval="[(6, 0, [
ref('payment_lyra.payment_icon_cc_lyracb'),
ref('payment_lyra.payment_icon_cc_lyravisa'),
ref('payment_lyra.payment_icon_cc_lyramastercard'),
])]"/>
<field name="image" type="base64" file="payment_lyra/static/src/img/logo.png" />
<field name="image_128" type="base64" file="payment_lyra/static/src/img/logo.png" />
<field name="code">lyramulti</field>
Expand All @@ -37,13 +30,12 @@
<field name="lyra_redirect_enabled">0</field>
<field name="lyra_redirect_success_timeout">5</field>
<field name="lyra_redirect_error_timeout">5</field>
<field name="lyra_return_mode">GET</field>
</record>

<record id="payment_method_lyramulti" model="account.payment.method">
<field name="name"><![CDATA[Lyra Collect Multi]]></field>
<field name="code">lyramulti</field>
<field name="payment_type">inbound</field>
<field name="lyra_return_mode">POST</field>
<field name="payment_method_ids"
eval="[Command.set([
ref('payment_lyra.payment_method_lyramulti'),
])]"
/>
</record>
</data>
</odoo>
Loading

0 comments on commit c9ad5ad

Please sign in to comment.