Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3da61c9
[IMP] OCA's Odoo: odoo-community.org development/release
petrus-v Mar 17, 2025
2f72861
Use standard mechanism to declare dev dependencies
sbidoul Jun 9, 2025
ed9953c
Add openupgradelib
sbidoul Jun 9, 2025
daa2887
freeze pytest version
petrus-v Jun 18, 2025
fc823a0
Add missing depenencies likes in production
petrus-v Jul 3, 2025
6d61195
integrate account_statement_import_online_wise Tom's fix using forein…
petrus-v Jul 21, 2025
06d6331
bump apps_product_creator re-activating and re-publishing modules pro…
petrus-v Jul 22, 2025
39cb63e
[REF] add locust benchmark and bump website_apps_store
petrus-v Aug 28, 2025
baaabfc
[UPD] remove merged OCA branches and update module versions to the me…
thomaspaulb Oct 9, 2025
8bc0e94
[MIG] pyproject.toml 14 to 18
Jan 8, 2026
491786f
Add interface-github.
Hussam-Suleiman Jan 8, 2026
eae0d6d
Add survey.
Hussam-Suleiman Jan 8, 2026
3c58daa
Fix pyproject.toml syntax.
Hussam-Suleiman Jan 8, 2026
40c6d25
Fix pyproject.toml syntax.
Hussam-Suleiman Jan 8, 2026
f603bcb
Fix pyproject.toml syntax.
Hussam-Suleiman Jan 8, 2026
1e7a4cf
[ADD] Contributors docs
thomaspaulb Jan 10, 2026
637f13d
fixup! Fix pyproject.toml syntax.
thomaspaulb Jan 10, 2026
cba5b50
[ADD] uv.lock
thomaspaulb Jan 10, 2026
0884d3a
[ADD] pdfminer
thomaspaulb Jan 10, 2026
48b3c37
[FIX] dependencies and sources of modules
thomaspaulb Jan 10, 2026
13f38d8
fixup! [FIX] dependencies and sources of modules
thomaspaulb Jan 10, 2026
8bbf6d4
fixup! fixup! [FIX] dependencies and sources of modules
thomaspaulb Jan 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Contribute to the OCA's Odoo instance

This guide aims to help happy volunteers to contribute to the OCA's Odoo instance. I
suppose mainly the OCA's Internal Tools team.

It's split into 3 sections:

- [Concepts](#concepts): Main concepts to understand and general organization
- [Processes](#processes): Helping doing the work without missing crucial steps
- [HowTos](#howto): How to do specific tasks

## Concepts

This repository is setup as other OCA's repositories to launch CI as usual and as an
extra configuration in order to build the OCA' Docker image used by our Odoo instance,
as well as facilitate the bootstrapping of a development environment.

Managing and freezing modules versions rely on python tools:

- [uv](https://docs.astral.sh/uv/)
- [hatch-odoo](https://pypi.org/project/hatch-odoo/)

## Processes

Here we focus on what to do without explaining how to do it.

### Release

While we are building and publishing a docker image the current state is that the image
is build at deploy time on OCA server.

While technically speaking there is nothing more than accessing to a public commit to
deploy a new version it's a common practice to merge your work on branch 14.0 before
deploying a new version in production.

> **Note**: in this repository we allow unreleased dependencies.

### deployment

Ask administrator to deploy the given commit.

## HowTos

Here we focus on how to do it, it's a suggest way to works but feel free to use your own
way.

### Setup developer environment

Requirements:

- Postgresql
- [uv](https://docs.astral.sh/uv/)
- Some dependencies to be able to build some python packages: `libpq-dev`,
`build-essential`, TODO
- wkhtmltopdf

Prepare a python virtual environment with the correct python version (which uv will
download for you if necessary) and install the required dependencies:

```bash
uv sync
```

### Neutralize database

If you are allow to access to a production database, neutralization happens while
stating the Docker container if the running environnement is not the production server.

On development, if your are not using docker you can running neutralize scripts such as:

```bash
find entrypoints/neutralize/*.sql -type f -exec psql <dbname> -f {} \;
```

### Development

For addons living in this repository, you can just change code and restart Odoo with the
`uv run` command.

For addons in other repositories, the procedure is as follows:

- check out the repository somewhere, ie /src/\$repo
- add the following line to `pyproject.toml` in the `[tool.uv.sources]` section:

```pyproject
odoo14-addon-$youraddon = { path = "/srv/$repo/setup/$youraddon", editable = true }
```

- run `uv sync`
- restart Odoo

### use unreleased dependency

There is two different goals:

- making the test CI pass: using regular test-requirements.txt files add a line such as

```
odoo14-addon-membership-delegated-partner-line @ git+https://github.com/OCA/vertical-association@refs/pull/151/head#subdirectory=setup/membership_delegated_partner_line
```

- bring the unreleased dependency in the uv project (and the built docker image), add
the following line to `pyproject.toml` in the `[tool.uv.sources]` section:

```pyproject
odoo14-addon-membership-delegated-partner-line = { git = "https://github.com/OCA/vertical-association", rev = "refs/pull/151/head", subdirectory = "setup/membership_delegated_partner_line" }
```

### Setup database and launch tests

- setup database with demo data and all oca modules installed

```bash
uv run odoo -d oca-custom -i oca_all --stop-after-init --without-demo=
```

- run tests using pytest launcher

```bash
uv run pytest --odoo-database oca-custom --cov ./oca_psc_team/ oca_psc_team/
```

### Update OCB Branch

```bash
uv sync -P odoo
```

### Update a specific OCA module dependency using the latest pypi release

```bash
uv sync -P odoo14-addon-<module-name>
```

### Bump all dependencies to the latest version

```bash
uv sync -U
```
12 changes: 5 additions & 7 deletions oca_all/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@
"account_reconcile_oca",
"account_statement_import_base",
"account_statement_import_file",
# "account_statement_import_online_wise",
"account_statement_import_online_wise",
"account_statement_import_online_paypal",
"account_tax_unece",
"account_usability",
# "apps_download",
# "apps_product_creator",
"base_technical_features",
"base_ubl",
"base_unece",
Expand All @@ -135,9 +133,9 @@
"document_knowledge",
"document_page",
"github_connector",
# "github_connector_oca",
"github_connector_oca",
"github_connector_odoo",
# "membership_delegated_partner_line",
"membership_delegated_partner_line",
"membership_extension",
"mis_builder",
"mis_builder_budget",
Expand All @@ -146,14 +144,14 @@
"multi_step_wizard",
"partner_statement",
"project_task_add_very_high",
# "oca_custom",
"oca_custom",
"partner_contact_access_link",
"project_role",
"report_xlsx",
"report_xlsx_helper",
"sentry",
"server_action_mass_edit",
# "survey_xlsx",
"survey_xlsx",
"sql_request_abstract",
"uom_unece",
"web_responsive",
Expand Down
114 changes: 114 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
[build-system]
requires = ["hatchling", "hatch-odoo"]
build-backend = "hatchling.build"


[project]
name = "oca-custom"
version = "18.0"
description = "Odoo by OCA"
# readme = "README.md"
requires-python = "==3.12.*"
dynamic = ["dependencies"]

[tool.hatch.build]
packages = ["./"]

# Enable the hatch-odoo metadata hook to generate dependencies from addons manifests.
[tool.hatch.metadata.hooks.odoo-addons-dependencies]
# Enable the hatch-odoo build hook to locate the Odoo addons and package them in odoo/addons.
# if not provided, "locals" modules (those in './') are not found and cannot be installed...
[tool.hatch.build.hooks.odoo-addons-dirs]

[tool.hatch-odoo]
# dependencies that are not in the addons manifest
dependencies = [
"odoo==18.0.*",
# indirect unrealeased dependencies
#"odoo-addons-design-themes==18.0.*",
# Add some constraints to Odoo deps that should be in their setup.py
"asn1crypto==1.5.1",
"Babel==2.10.3",
"cbor2==5.6.2",
"chardet==5.2.0",
"cryptography==42.0.8",
"decorator==5.1.1",
"docutils==0.20.1",
"freezegun==1.2.1",
"geoip2==2.9.0",
"gevent==24.2.1",
"greenlet==3.0.3",
"idna==3.6",
"Jinja2==3.1.2",
"libsass==0.22.0",
"lxml==5.2.1",
"lxml-html-clean",
"MarkupSafe==2.1.5",
"num2words==0.5.13",
"ofxparse==0.21",
"openpyxl==3.1.2",
"passlib==1.7.4",
"pdfminer.six==20211012",
"Pillow==10.2.0",
"polib==1.1.1",
"psutil==5.9.8",
"psycopg2==2.9.9",
"pyopenssl==24.1.0",
"PyPDF2==2.12.1",
"pyserial==3.5",
"python-dateutil==2.8.2",
"python-ldap==3.4.4",
"python-stdnum==1.19",
"pytz",
"pyusb==1.2.1",
"qrcode==7.4.2",
"reportlab==4.1.0",
"requests==2.31.0",
"rjsmin==1.2.0",
"urllib3==2.0.7",
"vobject==0.9.6.1",
"Werkzeug==3.0.1",
"xlrd==2.0.1",
"XlsxWriter==3.1.9",
"xlwt==1.3.0",
"zeep==4.2.1",
]
addons_dirs = ["./"]

[tool.uv]
# On OCA 14.0 series translations commits are realeased
# in pre-release state
prerelease = "allow"
# tell uv when dependencies may change
cache-keys = [{ file = "pyproject.toml" }, { file = "**/__manifest__.py" }]

[dependency-groups]
dev = [
"parameterized>=0.9.0",
"pytest>8",
"pytest-odoo==2.1.2",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.6.1",
"manifestoo>=1.0",
"odoo-test-helper",
"websocket-client",
]


[tool.uv.sources]
# Use fix updating account move line update membership line
odoo = { git = "https://github.com/OCA/OCB" }

# unreleased dependency, add it to test-requirements.txt to let the
# test pipeline to use it as well
odoo-addon-membership_delegated_partner_line = { git = "https://github.com/gfcapalbo/vertical-association", branch = "18.0-MIG-membership_delegated_partner_line", subdirectory = "membership_delegated_partner_line" }
odoo-addon-github_connector_oca = { git = "https://github.com/Therp/interface-github", branch = "18.0-mig-github_connector_oca", subdirectory = "github_connector_oca" }
odoo-addon-survey_xlsx = { git = "https://github.com/ByteMeAsap/survey", branch = "18.0-mig-survey_xlsx", subdirectory = "survey_xlsx" }
odoo-addon-account_statement_import_online_wise = { git = "https://github.com/Therp/bank-statement-import", branch = "18.0-mig-account-statement-import-online-wise", subdirectory = "account_statement_import_online_wise" }

# Example to develop module from an other repository
# installing in editable mode
# odoo14-addon-membership-delegated-partner-line = { path = "src/vertical-association/setup/membership_delegated_partner_line", editable = true }

[tool.pytest]
addopts = "-v -s --cov-report term-missing"
Loading
Loading