This odoo addon allows you to accept bitcoin and Lightning Network (and other cryptocurrency) payments in your Odoo e-commerce store.
Please find the installation instructions here:
BTCPay Server addon for Odoo
OS: Ubuntu 22.04.4 LTS
OpenSSL: OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
Python version: 3.10
Steps to reproduce:
Traceback:
Traceback (most recent call last):
File "/mnt/code/odoo/odoo/http.py", line 1770, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/mnt/code/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/mnt/code/odoo/odoo/http.py", line 1797, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/mnt/code/odoo/odoo/http.py", line 2001, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/mnt/code/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/mnt/code/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/mnt/code/odoo/odoo/http.py", line 725, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/mnt/code/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/mnt/code/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/mnt/code/odoo/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/mnt/code/odoo/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/mnt/code/odoo/addons/web/models/models.py", line 1063, in onchange
record._apply_onchange_methods(field_name, result)
File "/mnt/code/odoo/odoo/models.py", line 6932, in _apply_onchange_methods
res = method(self)
File "/mnt/code/btcpayserver-addons/payment_btcpay/models/payment_provider.py", line 34, in _onchange_pairingCode
client = BTCPayClient(host=self.btcpay_location, pem=self.btcpay_privateKey)
File "/mnt/code/btcpayserver-addons/payment_btcpay/models/libs/client.py", line 22, in __init__
self.client_id = crypto.get_sin_from_pem(pem)
File "/mnt/code/btcpayserver-addons/payment_btcpay/models/libs/crypto.py", line 23, in get_sin_from_pem
version = get_version_from_compressed_key(public_key)
File "/mnt/code/btcpayserver-addons/payment_btcpay/models/libs/crypto.py", line 65, in get_version_from_compressed_key
rphash = hashlib.new('ripemd160')
File "/usr/lib/python3.10/hashlib.py", line 166, in __hash_new
return __get_builtin_constructor(name)(data)
File "/usr/lib/python3.10/hashlib.py", line 123, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type ripemd160
You are using a deprecated repository from bitpay.
"""btcpay.crypto
These are various crytography related utility functions borrowed from:
bitpay-python: https://github.com/bitpay/bitpay-python
"""
Should use instead https://github.com/bitpay/python-bitpay-client
Although the new repository is still using ripemd160
.
For what I've seen in this discussion openssl/openssl#16994
They (openssl dev team) discourage the use of ripemd160
, but the Bitcoin project still uses it.
I propose to rename this repository to btcpayserver/odoo-addons, any objections? @vandekul
Hi,
trying to install the module on a local odoo 16 docker deployment, when I click activate on the module I get the following error:
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1611, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1815, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_http.py", line 237, in _dispatch
response = super()._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 697, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 46, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-74>", line 2, in button_immediate_install
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 468, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "<decorator-gen-14>", line 2, in new
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 488, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 372, in load_marked_modules
loaded, processed = load_module_graph(
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 188, in load_module_graph
load_openerp_module(package.name)
File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 468, in load_openerp_module
__import__('odoo.addons.' + module_name)
File "/mnt/extra-addons/payment_btcpay/__init__.py", line 3, in <module>
from . import controllers
File "/mnt/extra-addons/payment_btcpay/controllers/__init__.py", line 1, in <module>
from . import main
File "/mnt/extra-addons/payment_btcpay/controllers/main.py", line 36, in <module>
from btcpay import BTCPayClient
ModuleNotFoundError: No module named 'btcpay'
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (http://localhost:8069/web/assets/667-b1681ab/web.assets_backend.min.js:986:163)
at XMLHttpRequest.<anonymous> (http://localhost:8069/web/assets/667-b1681ab/web.assets_backend.min.js:994:13)
Let me know if you need any more information.
Do you know if your addon works with Odoo 15?
Hi Susanna
Are you Planning to Upgrade it to Odoo 16?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.