Monday, October 21, 2024
4 changes · master
Resolved issues and error corrections
This change removes a recently added dependency that caused installation problems for some teams and was not aligned with supported packaging requirements. It replaces newer Python typing usage with compatible alternatives so Odoo remains installable on the currently supported Python and Ubuntu versions.
Original PR description
typing_extensions was added to the dependencies but it wasn't done correctly: * The dependency was only added to backport Self which was only added in py3.11 (the min version supported by Odoo this day is still 3.10). * The version required (4.4) is higher than the version of the library found inside the Ubuntu Jammy repository (3.10). And Self isn't present inside the 3.10 version of the lib. * The dependency was added with no approval of the packaging team, who disapproves adding a new dependency. * It breaks the installation of co-workers because they have not been notified that they needed to `pip install` a new library. Until a better solution is found, we removed both the new dependency and the usages of `typing.Self` across the repository.
This change prevents compatibility issues when running Odoo with Python 3.10 by adjusting how an internal typing helper is loaded. It helps keep developer tooling and runtime behavior stable without affecting everyday business workflows.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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