Josse Colpaert ec172b74fe [FIX] l10n_*: fix tests + don't decorate test class with freeze_time
*: l10n_fr_fec, l10n_account_edi_ubl_cii_tests

Fix two failing tests in: - l10n_fr_fec: Add missing factor_percent in
the creation of a tax in the test for FEC - account_edi_ubl_cii: The
invoice name supposed the old convention per month while this was
changed to on a per year basis anyways for customer invoices.

These two tests were ignored by runbot for a while and began to fail
only after the runbot exception was removed (see:
https://runbot.odoo.com/runbot/build/22172258).

In addition, tests in `TestItEdi` started to fail as well when the
exception was removed ! In particular, if an exception was raised in the
`setUpClass` of `TestAccountFrFec`, the tests in `TestItEdi` were
failing.

This is because `TestAccountFrFec` is decorated with
`freeze_time('2021-05-02')`. Indeed, when one decorates a subclass of
`unittest.TestCase` with freeze_time, if the `setUpClass` raises an
Exception, `_freeze_time.stop()` is not called, and the frozen date is
propagated in the other test classes. As a consequence, when an
exception was raised in the `setUpClass` of `TestAccountFrFec`, the
freeze_time set in `TestAccountFrFec` (2021-05-02) was kept in
`TestItEdi`, thus causing tests to fail in `TestItEdi`.

As a conclusion, `freeze_time` should never decorate an Odoo test class.

closes odoo/odoo#109324

X-original-commit: 531270666ec5a6582d4a0a68ea534f2a3a6852ff
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-01-06 18:41:38 +01:00
2022-12-13 17:03:17 +01:00
2023-01-03 13:16:02 +01:00
2023-01-06 14:31:50 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
…
2023-01-03 13:16:02 +01:00
2023-01-03 13:16:02 +01: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%