[15.0] pos_payment_change_wizard strange behavior on rounding
Module
pos_payment_change -> pos_payment_change_wizard -> button_change_payment() method https://github.com/OCA/pos/blob/520940ba976bb6580529dc534d3de400d454c237/pos_payment_change/wizards/pos_payment_change_wizard.py#L59
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: https://github.com/odoo/odoo/issues/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:
- Sell an article in POS by using cash
- Try to change paiement method to something else
thanks