[REF] pos_payment_method_cashdro_rounding: hook the amount, not the url builder
`_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>
This commit is contained in:
parent
7ae10abda8
commit
57bf688169
3 changed files with 75 additions and 14 deletions
|
|
@ -1,18 +1,19 @@
|
|||
# Copyright Criptomart
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "POS CashDro Rounding",
|
||||
"version": "18.0.1.0.0",
|
||||
"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": [
|
||||
"point_of_sale",
|
||||
"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",
|
||||
],
|
||||
},
|
||||
"installable": True,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue