Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update core addon lists #74

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

aisopuro
Copy link
Contributor

Basically the same as #71

Odoo has added at least l10n_tz_account to the core modules, and installing Enterprise once again breaks.

@sbidoul
Copy link
Member

sbidoul commented Jul 15, 2024

Thanks! One day we'll find a way to have these lists online se we don't need a release.

But I'm curious about this:

installing Enterprise once again breaks

How do you install Enterprise so it breaks in this case?

@sbidoul sbidoul merged commit 786f833 into acsone:main Jul 15, 2024
8 checks passed
@sbidoul
Copy link
Member

sbidoul commented Jul 15, 2024

v 1.7 in on its way to PyPI.

@aisopuro
Copy link
Contributor Author

Thanks for the merge!

Regarding your question:

Thanks! One day we'll find a way to have these lists online se we don't need a release.

But I'm curious about this:

installing Enterprise once again breaks

How do you install Enterprise so it breaks in this case?

I package enterprise into a docker image, and use pip-compile to try and ensure all dependencies are properly locked (for later debugging if nothing else).

I make enterprise installable by adding a pyproject.toml file to it that makes it use hatch:

[build-system]
requires = [
    "hatchling",
    "hatch-odoo",
    # manifestoo-core 1.5 is missing several core modules, so make sure we use an up-to-date-version
    "manifestoo-core>1.5",
]
build-backend = "hatchling.build"

[project]
name = "odoo-enterprise"
version = "17.0.2023.12.13"
dynamic = ["dependencies"]

[tool.hatch.build.targets.wheel]
include = ["*"]

[tool.hatch.metadata.hooks.odoo-addons-dependencies]

[tool.hatch.build.hooks.odoo-addons-dirs]

[tool.hatch-odoo]
odoo_version_override = "17.0"
addons_dirs = [
    ".",
]

I then mention the enterprise folder in a requirements.in file, which I pass to pip-compile. So technically it fails in the pip-compile stage, not during installation. But in my experience/testing pip-compile does the same dependency resolution that normal pip installation does, so it would fail in that step at the latest anyway.

I believe the same thing would happen if I tried to pip-install some third party module that depended on the newly added core module. If Odoo didn't add an enterprise dependency on the new core module (in this case they added l10n_tz_reports it seems) there would probably be no issue, at least not for me.

@sbidoul
Copy link
Member

sbidoul commented Jul 16, 2024

Cool, good to see hatch-odoo works for you.

You can solve this by adding external_dependencies_only = true in the [tool.hatch-odoo] section.
This way, it will not attempt to look for addons dependencies in enterprise, because by definition, all addons that enterprise depends on are in odoo. I'll need to document this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants