Odoo 18.0 compatibility.

This commit is contained in:
ndeet
2025-01-27 14:50:53 +01:00
parent dec467e55b
commit b935000fda
4 changed files with 13 additions and 13 deletions
+3 -2
View File
@@ -1,11 +1,12 @@
# BTCPay Server payment gateway for Odoo 16 and 17 # BTCPay Server payment gateway for Odoo 16, 17 and 18
## Accept bitcoin payments on Odoo 16 and 17 ## Accept bitcoin payments on Odoo 16, 17 and 18
This odoo addon allows you to accept bitcoin and Lightning Network (and other cryptocurrency) payments in your Odoo e-commerce store. This odoo addon allows you to accept bitcoin and Lightning Network (and other cryptocurrency) payments in your Odoo e-commerce store.
![BTCPay Server Banner](https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPay-Odoo-17-featured.png) ![BTCPay Server Banner](https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPay-Odoo-17-featured.png)
## How to install ## How to install
Please find the installation instructions here: Please find the installation instructions here:
- [Odoo 18 documentation](https://github.com/btcpayserver/odoo/blob/18.0/payment_btcpayserver/README.md)
- [Odoo 17 documentation](https://github.com/btcpayserver/odoo/blob/17.0/payment_btcpayserver/README.md) - [Odoo 17 documentation](https://github.com/btcpayserver/odoo/blob/17.0/payment_btcpayserver/README.md)
- [Odoo 16 documentation](https://github.com/btcpayserver/odoo/blob/16.0/payment_btcpayserver/README.md) - [Odoo 16 documentation](https://github.com/btcpayserver/odoo/blob/16.0/payment_btcpayserver/README.md)
+8 -8
View File
@@ -1,16 +1,16 @@
# BTCPay Server payment gateway for Odoo 17 # BTCPay Server payment gateway for Odoo 18
## This is the module to connect Odoo 17 and BTCPay Server ## This is the module to connect Odoo 18 and BTCPay Server
This module allows you to accept bitcoin (and other cryptocurrency) payments in your Odoo e-commerce store. This module allows you to accept bitcoin (and other cryptocurrency) payments in your Odoo e-commerce store.
![BTCPay Server Banner](https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPay-Odoo-17-featured.png) ![BTCPay Server Banner](https://raw.githubusercontent.com/btcpayserver/odoo/18.0/payment_btcpayserver/static/description/BTCPay-Odoo-17-featured.png)
:::tip :::tip
If you use Odoo 16 you can find the documentation [here](https://github.com/btcpayserver/odoo/blob/16.0/payment_btcpayserver/README.md). If you use Odoo 16 you can find the documentation [here](https://github.com/btcpayserver/odoo/blob/16.0/payment_btcpayserver/README.md) and for Odoo 17 [here](https://github.com/btcpayserver/odoo/blob/17.0/payment_btcpayserver/README.md).
::: :::
## Install the module ## Install the module
* Clone our [repository](https://github.com/btcpayserver/odoo) or download the .zip from the [releases page](https://github.com/btcpayserver/odoo/releases) * Clone our [repository](https://github.com/btcpayserver/odoo) or download the .zip from the [releases page](https://github.com/btcpayserver/odoo/releases)
* Make sure you are on branch `17.0` or downloaded a release tagged with version v17.x * Make sure you are on branch `18.0` or downloaded a release tagged with version v18.x
* Place the `payment_btcpayserver` directory in your Odoo addons directory * Place the `payment_btcpayserver` directory in your Odoo addons directory
* Install dependencies by running `pip install -r requirements.txt` (from inside the `payment_btcpayserver` directory) * Install dependencies by running `pip install -r requirements.txt` (from inside the `payment_btcpayserver` directory)
* Restart Odoo * Restart Odoo
@@ -46,13 +46,13 @@ Check the payment method is enabled:
Congrats, all done. Do some testing to be sure all works. Congrats, all done. Do some testing to be sure all works.
![Payment Provider Settings](https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPayPaymentSettings.png) ![Payment Provider Settings](https://raw.githubusercontent.com/btcpayserver/odoo/18.0/payment_btcpayserver/static/description/BTCPayPaymentSettings.png)
## How does the payment page look? ## How does the payment page look?
During the checkout the customers will have the option to select the payment method "Pay with Bitcoin / Lightning Network". After selecting they will be redirected to the BTCPay checkout page as shown below. During the checkout the customers will have the option to select the payment method "Pay with Bitcoin / Lightning Network". After selecting they will be redirected to the BTCPay checkout page as shown below.
![Checkout page example](https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPayLooksLike.png) ![Checkout page example](https://raw.githubusercontent.com/btcpayserver/odoo/18.0/payment_btcpayserver/static/description/BTCPayLooksLike.png)
## Transaction BTCPay Details ## Transaction BTCPay Details
@@ -61,7 +61,7 @@ In transaction object, you will find more technical information about this metho
* Invoice Id: the id of the invoice for which you want to fetch an event token * Invoice Id: the id of the invoice for which you want to fetch an event token
* Transaction Status: That indicates state of transaction * Transaction Status: That indicates state of transaction
![Transaction details of BTCPay](https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BtcpayTxDetails.png) ![Transaction details of BTCPay](https://raw.githubusercontent.com/btcpayserver/odoo/18.0/payment_btcpayserver/static/description/BtcpayTxDetails.png)
## Troubleshooting ## Troubleshooting
### The order and transaction status does not get updated to "paid" ### The order and transaction status does not get updated to "paid"
+2 -2
View File
@@ -21,11 +21,11 @@
{ {
'name': 'Payment Provider: BTCPay Server', 'name': 'Payment Provider: BTCPay Server',
'summary': 'This module integrates BTCPAY - pay with Bitcoin - with Odoo v17.0', 'summary': 'This module integrates BTCPAY - pay with Bitcoin - with Odoo v18.0',
'author': 'BTCPay Server team and contributors', 'author': 'BTCPay Server team and contributors',
'website': 'https://github.com/btcpayserver/odoo', 'website': 'https://github.com/btcpayserver/odoo',
'category': 'Accounting/Payment Providers', 'category': 'Accounting/Payment Providers',
'version': '17.0.2.0', 'version': '18.0.1.0',
'license': 'GPL-3', 'license': 'GPL-3',
'currency': 'USD', 'currency': 'USD',
'application': False, 'application': False,
@@ -89,7 +89,6 @@ class PaymentTransaction(models.Model):
""" """
tx = self._get_tx_from_notification_data(provider_code, notification_data) tx = self._get_tx_from_notification_data(provider_code, notification_data)
tx._process_notification_data(notification_data) tx._process_notification_data(notification_data)
tx._execute_callback()
return tx return tx
def _process_notification_data(self, notification_data): def _process_notification_data(self, notification_data):