|
1 | 1 | # Odoo documentation |
2 | 2 |
|
3 | | -## Build the documentation locally |
| 3 | +## Build the documentation |
4 | 4 |
|
5 | 5 | ### Requirements |
6 | 6 |
|
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/). |
10 | 9 | - 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) |
13 | 14 |
|
14 | | -### Instructions |
| 15 | +### Quick start |
15 | 16 |
|
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. |
21 | 23 |
|
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 |
25 | 25 |
|
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. |
27 | 36 |
|
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. |
30 | 48 |
|
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. |
33 | 51 |
|
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). |
35 | 65 |
|
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