Daily updates from Odoo
Monday, October 21, 2024
2 changes · master
Resolved issues and error corrections
This fixes a test conflict that happened when the demo social media module was installed alongside Twitter social features. It ensures anti-spam checks can be tested reliably without being disrupted by demo data behavior.
Original PR description
If `social_demo` is installed, it overrides all social method calls to return hardcoded data, and notably does not account for the "anti-spam" system. This means running the anti-spam test with `social_demo` installed can not succeed.
This change updates inter-company sales and purchasing tests so they no longer assume that multi-currency mode is enabled. It helps ensure the tests run reliably in databases with only one active currency, reducing false failures in validation environments.
Original PR description
Both modules have tests with an unstated dependency on the multi-currency mode, as they unconditionally try setting currencies into forms.
They will pass if they run in a multi-currency-enabled database[^1] but if the context is non-multi-currency (e.g. no l10n module is explicitly installed so only `l10n_us` is present and USD is the only currency) then they fail with
can't write on invisible field 'currency_id'
[^1]: generally the case on runbot where `l10n_be` is ~always
installed, which enables EUR, which being a second currency
automatically enables multi-currency