Skip to content

Commit 9f9cb3d

Browse files
committed
[IMP] README: restructure content and document additional commands
closes #15101 X-original-commit: 29614b8 Signed-off-by: Antoine Vandevenne (anv) <[email protected]>
1 parent 500b095 commit 9f9cb3d

File tree

2 files changed

+55
-25
lines changed

2 files changed

+55
-25
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ static: $(HTML_BUILD_DIR)/_static/style.css
9191
test:
9292
@python tests/main.py $(SOURCE_DIR)/administration $(SOURCE_DIR)/applications $(SOURCE_DIR)/contributing $(SOURCE_DIR)/developer redirects
9393

94-
# Similar as `test`, but called only manually by content reviewers to trigger extra checks.
94+
# Similar to `test`, but called only manually by content reviewers to specify a path and a max line
95+
# length.
9596
review:
9697
@read -p "Enter relative content path: " path; read -p "Enter max line length (default: 100): " line_length; \
9798
if [ -z "$$path" ]; then echo "Error: Path cannot be empty"; exit 1; fi; \

README.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,67 @@
11
# Odoo documentation
22

3-
## Build the documentation locally
3+
## Build the documentation
44

55
### Requirements
66

7-
- Git
8-
- Python 3.6, 3.7, or 3.8
9-
- Python dependencies listed in the file `requirements.txt`.
7+
- [Git](https://git-scm.com/install)
8+
- [Python 3.10 to 3.14](https://www.python.org/downloads/).
109
- Make
11-
- A local copy of the [odoo/odoo repository](https://github.com/odoo/odoo) (optional)
12-
- A local copy of the [odoo/upgrade-util repository](https://github.com/odoo/upgrade-util) (optional)
10+
- Python dependencies from `requirements.txt` (see instructions below)
11+
- A local copy of the [odoo/odoo](https://github.com/odoo/odoo) repository (optional)
12+
- A local copy of the [odoo/upgrade-util](https://github.com/odoo/upgrade-util) repository
13+
(optional)
1314

14-
### Instructions
15+
### Quick start
1516

16-
1. In a terminal, navigate to the root directory of the documentation and build it `make`.
17-
Additional commands are available with `make help`.
18-
2. Open the file `documentation/_build/html/index.html` in your web browser.
19-
3. See [this guide](https://www.odoo.com/documentation/latest/contributing/documentation.html)
20-
for more detailed instructions.
17+
1. Create and activate a virtual environment.
18+
- On Linux and macOS: `python3 -m venv .venv && source .venv/bin/activate`
19+
- On Windows (PowerShell): `py3 -m venv .venv; .\.venv\Scripts\Activate.ps1`
20+
2. Install the Python dependencies: `pip install -r requirements.txt`
21+
3. Build the documentation: `make html` (see more commands with `make help`)
22+
4. Open `documentation/_build/html/index.html` in your web browser.
2123

22-
Optional: place your local copy of the `odoo/odoo` and `odoo/upgrade-util` repositories in
23-
the parent directory or in the root directory of the documentation to build the latter
24-
with the documented Python docstrings.
24+
### Additional build options
2525

26-
## Contribute to the documentation
26+
- `make fast` to build the documentation with a shallow menu (faster).
27+
- `make clean` to delete the build files.
28+
- `make test` to run the guidelines tests.
29+
- `make html CURRENT_LANG=fr` to build the documentation only in French.
30+
- `make html CURRENT_LANG=fr LANGUAGES=en,fr,de` to build the documentation in French and enable the
31+
language switcher, with the specified LANGUAGES as available languages. This command must be
32+
invoked for each CURRENT_LANG you want to build.
33+
- `make html VERSIONS=17.0,18.0,saas-18.4,19.0,master` to build the documentation in the **current
34+
version** and enable the version switcher, with the specified VERSIONS as available versions. This
35+
command must be invoked for each of the VERSIONS you want to build.
2736

28-
For contributions to the content of the documentation, please refer to the
29-
[Introduction Guide](https://www.odoo.com/documentation/latest/contributing/documentation.html).
37+
The list of available languages can be found in `conf.py`, in the `languages_names` variable.
38+
39+
When building the documentation for a specific language or version, the build files are created in
40+
`documentation/_build/html/<language>/`, `documentation/_build/html/<version>/` or
41+
`documentation/_build/html/<version>/<language>/`.
42+
43+
### Using local Odoo sources
44+
45+
If you have local checkouts of `odoo/odoo` and/or `odoo/upgrade-util`, place them either:
46+
- as siblings of this repository (in the parent directory), or
47+
- inside the `documentation` directory.
3048

31-
To **report a content issue**, **request new content** or **ask a question**, use the
32-
[repository's issue tracker](https://github.com/odoo/documentation/issues).
49+
When present in one of these locations, the build will include Python docstrings from those
50+
repositories if their version matches the documentation's version.
3351

34-
## Learn More
52+
### Troubleshooting
53+
54+
- Verify your Python version: `python3 --version` (must be 3.10–3.14)
55+
- Ensure your virtual environment is active and dependencies are installed.
56+
- If you have made changes to the file structure, try `make clean` before building.
57+
- If the language or version switchers redirect to a missing file, check that you have built the
58+
documentation for all available languages and versions.
59+
- The "Developer" documentation is only available in English.
60+
61+
## Contribute to the documentation
62+
63+
For contributions to the content of the documentation, see the
64+
[Introduction Guide](https://www.odoo.com/documentation/latest/contributing/documentation.html).
3565

36-
To learn more about Odoo, in addition to the documentation, have a look at
37-
[the official eLearning](https://odoo.com/slides) and
38-
[Scale-up, The Business Game](https://www.odoo.com/page/scale-up-business-game).
66+
To report a content issue, request new content, or ask a question, use the
67+
[issue tracker](https://github.com/odoo/documentation/issues).

0 commit comments

Comments
 (0)