roen-odoo f71bb322f6 [FIX] point_of_sale: fix rounding issue when closing pos session
Current behavior:
When the currency in the PoS is not the same currency as the one of the
company, and uses a big rates there are sometimes rounding issues. These
rounding issues can lead to a difference at closing that prevent you
from closing the PoS session.

Steps to reproduce:
- Make sure atleast 2 currencies are activated. (USD and EUR)
- Modify the USD rounding factor to 0.000001
- Modify the rate for the EUR to 2100 Unit/USD
- Now go in the PoS settings and go in the Default Journals Order and
  set the currency to EUR
- Change the pricelist currency to EUR
- Change the cash payment method journal currency to EUR and remove
  other payment methods
- Open a PoS session and create a new order with 3 products with a
  price that has decimals
- Pay the order with cash
- Close the session, you will get an error

The error was happening because the rounding was done on each line and
therefore we were losing precision.

opw-3258806

closes odoo/odoo#129241

X-original-commit: 112e224ace6e658c563d6041532e133ddcc1c8a7
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-21 11:35:05 +02:00
2023-07-12 11:19:58 +02:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%