Johan Demaret Rivarola 218d5ce6a8 [FIX] (website_)sale_coupon: avoid race condition on currency
Creating a new database with only website_sale_coupon installed will
make some (website_)sale_coupon tests fail. This is due to a race condition
messing with the value of the pricelist product.list0 currency.

The tests are failing due to amounts being compared after the USD
currency rate of 1.2834 has been applied.

Example on a 10% discount:

expected:
>>> 320 * 0.9
288.0

actual:
>>> 320 * 1.2834 * 0.9
369.62

This is due to
https://github.com/odoo/odoo/blob/3cf9cfc985950c30c6b76480f77f5ffe53650b24/addons/website_sale/data/demo.xml#L228
overriding the value to USD. The tests should not rely on this.

This commit aims to ensure the currency is enforced before each test run.

closes #4371

Signed-off-by: Christophe Simonis <chs@odoo.com>

X-port/Cherry-pick of odoo/enterprise@c1cc464c44
2019-06-05 18:18:52 +02:00
2019-03-20 14:59:50 +00:00
…
2018-10-09 13:44:38 +00:00
…
…
2019-03-13 15:10:02 +00: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, Purchase Management, ...

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.

Then follow 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%