`_cashdro_payment_url()` is shared by the payment and the reversal paths, so patching it applied the rounding to the reversals too: giving back a paid order sent the drawer the *order* remaining, rounded, instead of the amount of the line, and reversing an order already covered by other payments sent 0. It also collided with the modules that fix that same method, leaving the outcome to the asset load order. Both go away by hooking `_cashdro_amount()`, the extension point `pos_payment_method_cashdro_flow_fix` provides, which is only reached on a payment. `shouldRound`/`getDefaultAmountDueToPayIn` came with the 18.0 tax totals rework, so fall back instead of breaking the payment with a TypeError the operator would read as one more connection error. Adds the README_DEV.md the repo conventions ask for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
19 lines
595 B
Python
19 lines
595 B
Python
# Copyright Criptomart
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
{
|
|
"name": "POS CashDro Rounding",
|
|
"version": "18.0.1.1.0",
|
|
"summary": "Apply cash/currency rounding to CashDro payment request amount.",
|
|
"category": "Point of Sale",
|
|
"license": "AGPL-3",
|
|
"author": "Criptomart",
|
|
"depends": [
|
|
"pos_payment_method_cashdro",
|
|
"pos_payment_method_cashdro_flow_fix",
|
|
],
|
|
"assets": {
|
|
"point_of_sale._assets_pos": [
|
|
"pos_payment_method_cashdro_rounding/static/src/js/cashdro_rounding.esm.js",
|
|
],
|
|
},
|
|
}
|