addons-cm/pos_payment_method_cashdro_fix/readme/ROADMAP.rst
GitHub Copilot 4615da6dae [ADD] pos_payment_method_cashdro_fix: 17.0 API leftovers in the OCA base module
The 18.0 migration of `pos_payment_method_cashdro` (OCA/pos@6a4c251d) kept
three uses of APIs removed in 18.0. The module has no tests nor tours and needs
a physical drawer to be exercised, so the OCA CI can't catch them:

* `_cashdro_url()` reads `order.selected_paymentline`, so `.payment_method` on
  the resulting `undefined` throws a TypeError on every payment, swallowed into
  a generic "An error occurred while connecting to the cashdro" dialog.
* The `add_paymentline()` patch checks `line.payment_method`, renamed to
  `payment_method_id`, so the line keeps the default due amount instead of
  waiting for the amount the customer inserts.
* `_loader_params_pos_payment_method()` is the 17.0 loading API, replaced by
  `_load_pos_data_fields()`. Dead code, so the CashDro credentials never reach
  the front end.

Patched from the outside, as OCA sources are not to be modified. Written to
stay harmless once fixed upstream: the Python override only adds the missing
fields and the JS patches are idempotent against the fixed code.

`upstream/pos_payment_method_cashdro-18.0-fixes.patch` holds the same fixes as
a ready to send `git format-patch`, verified with `git apply --check`. This
module is temporary and should be removed once that lands in OCA/pos.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 13:31:11 +02:00

10 lines
580 B
ReStructuredText

This module is meant to be temporary. The fixes are proposed upstream in
``upstream/pos_payment_method_cashdro-18.0-fixes.patch``; once they are merged
in ``OCA/pos`` this module can be uninstalled and removed.
It is written to stay harmless in the meantime: the Python override only adds
the credential fields that are missing from the loader, and the JavaScript
patches are idempotent with respect to the fixed upstream code.
The JavaScript side can't be covered by automated tests, as it needs a CashDro
terminal answering on the network. See ``USAGE`` for the manual check.