The OCA sources living outside this repo were mounted from a hardcoded /media/snt/data/odoo in a local, untracked docker-compose.override.yml. The host root now comes from ODOO_SRC in .env (gitignored, .env.example added), so the mounts can live in docker-compose.yml itself and be shared. Also parameterized: the published ports (ODOO_HTTP_PORT / ODOO_LONGPOLLING_PORT) and the in-container addons path (ODOO_ADDONS_PATH), the latter being the single source of truth for the `command` and for manual `docker-compose run odoo odoo ...` invocations. Missing variables fail with an explicit message instead of mounting empty paths. `docker-compose config` resolves exactly as before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
21 lines
1.1 KiB
ReStructuredText
21 lines
1.1 KiB
ReStructuredText
There is nothing to configure: installing the module is enough.
|
|
|
|
To check the three fixes on a PoS with a CashDro terminal:
|
|
|
|
#. Open a PoS session, add a product and go to the payment screen.
|
|
#. Select the CashDro payment method. The payment line must show **0**, not the
|
|
due amount (fix 2).
|
|
#. The drawer must start the operation and ask for the amount, instead of the
|
|
*"An error occurred while connecting to the cashdro"* dialog (fixes 1 and 3).
|
|
#. With no CashDro at hand, the browser console tells fix 1 from fix 3 apart:
|
|
without this module the failure is a ``TypeError: Cannot read properties of
|
|
undefined (reading 'payment_method')``; with it, a network error against the
|
|
configured host.
|
|
|
|
The Python side is covered by the tests. The base module lives outside this
|
|
repo, so the OCA sources have to be on the addons path (mounted by
|
|
``docker-compose.yml`` from ``ODOO_SRC``, set in your local ``.env``)::
|
|
|
|
docker-compose run --rm odoo odoo -c /etc/odoo/odoo.conf \
|
|
--addons-path=/mnt/extra-addons,/mnt/oca/pos,/usr/lib/python3/dist-packages/odoo/addons \
|
|
-d odoo -u pos_payment_method_cashdro_fix --test-enable --stop-after-init
|