-
- Downloads
[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@c1cc464c44393443ef0ad595809dfd02e5b34577
Please register or sign in to comment