Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0] pos_payment_change_wizard strange behavior on rounding #1177

Open
PlantBasedStudio opened this issue Apr 17, 2024 · 0 comments
Open
Labels

Comments

@PlantBasedStudio
Copy link

Module

pos_payment_change -> pos_payment_change_wizard -> button_change_payment() method

def button_change_payment(self):

Describe the bug

When you wish to modify a payment method that was originally in cash, odoo's basic operation converts the amount by rounding.
The amount_total and amount_paid values will take on a value such as 12.4000008 instead of 12.40.
The problem has already been reported in the following link, but without correction:
odoo/odoo#7024

the problem is that the current module will compare the odoo values and therefore the change of payment method will not take place.
I think we should modify the method that compares the amounts to check that the first two digits after the decimal point are correct, rather than all the currency digits.

To Reproduce

Affected versions: 15.0

Steps to reproduce the behavior:

  1. Sell an article in POS by using cash
  2. Try to change paiement method to something else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant