d5ecad2a36002558b25ee33633774e85ecaed668
Follow-up of f1e79c74a5c07d6be3154629f6f381ebaf907fb1 The issue still arises with: 8 % 1.6 = 1.5999999999999996 The modulo operator on float doesn't seem reliable for our use case, therefore we use a combination of `float_round` and `float_compare` to verify the quantity sold is a multiple of the quantity per package. The rounding threshold is 0.01, meaning that the warning might not be raised for some specific configurations. For example, 8.005 units with a package of 1.6 won't return a warning. Since this is a non-blocking warning, this should be enough for most cases. opw-2241985 closes odoo/odoo#49983 X-original-commit: 3d48e2b49023eaf1b1dd0c8cb2b7723e41924a38 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
…
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%