gOdoo-cli 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/PKG-INFO +3 -1
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/README.md +2 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/pyproject.toml +1 -1
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/setup.py +2 -2
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/__init__.py +1 -1
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/bootstrap.py +9 -11
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/source_get.py +10 -12
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/helpers/odoo_files.py +36 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/LICENSE +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/__main__.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/cli.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/__init__.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/launch.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/makedev.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/rpc/__init__.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/rpc/cli.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/rpc/cli_callbacks.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/rpc/importer.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/rpc/modules.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/rpc/translations.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/shell.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/commands/test.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/git/__init__.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/git/git_odoo.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/git/git_odoo_addons.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/git/git_repo.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/git/git_url.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/git/zip_download.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/helpers/__init__.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/helpers/cli.py +0 -0
- {godoo_cli-0.1.1 → godoo_cli-0.1.2}/src/godoo_cli/helpers/odoo_manifest.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: godoo-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Wrapper around Odoo-Bin with some convinience RPC functions.
|
|
5
5
|
License: LGPL-3
|
|
6
6
|
Author: Joshua Kreuder
|
|
@@ -37,6 +37,8 @@ Description-Content-Type: text/markdown
|
|
|
37
37
|

|
|
38
38
|

|
|
39
39
|
|
|
40
|
+
[<img src="https://raw.githubusercontent.com/OpenJKSoftware/gOdoo/main/assets/godoo-main-cli.png" width="1000"/>](image.png)
|
|
41
|
+
|
|
40
42
|
**gOdoo** is short for **go Odoo**. \
|
|
41
43
|
It is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)
|
|
42
44
|
with Python CLI `godoo` convenience wrapper around `odoo-bin`.
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|
|
|
6
|
+
[<img src="https://raw.githubusercontent.com/OpenJKSoftware/gOdoo/main/assets/godoo-main-cli.png" width="1000"/>](image.png)
|
|
7
|
+
|
|
6
8
|
**gOdoo** is short for **go Odoo**. \
|
|
7
9
|
It is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)
|
|
8
10
|
with Python CLI `godoo` convenience wrapper around `odoo-bin`.
|
|
@@ -40,9 +40,9 @@ entry_points = \
|
|
|
40
40
|
|
|
41
41
|
setup_kwargs = {
|
|
42
42
|
'name': 'godoo-cli',
|
|
43
|
-
'version': '0.1.
|
|
43
|
+
'version': '0.1.2',
|
|
44
44
|
'description': 'Wrapper around Odoo-Bin with some convinience RPC functions.',
|
|
45
|
-
'long_description': '# gOdoo Dev Environment\n\n\n\n\n**gOdoo** is short for **go Odoo**. \\\nIt is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)\nwith Python CLI `godoo` convenience wrapper around `odoo-bin`.\n\nThis repository is the base source for the Python package [godoo-cli](https://pypi.org/project/godoo-cli/) and serves as\nan all batteries included development environment.\n\nMade Possible by: [WEMPE Elektronic GmbH](https://wetech.de)\n\n# gOdoo-cli\n\nPython package that provides `godoo` command line interface around `odoo-bin`.\n\nIt\'s build with [Typer](https://github.com/tiangolo/typer) to provide some convenience Wrappers for Odoo development and\nDeployment.\n\nMost flags can be configured by Env variables. \\\nUse `godoo --help` to find out more. HINT: Install tab-completion with `godoo --install-completion`\n\n# Docker\n\nThis workspace also contains Docker and Docker-Compose files. \\\n\nThey are used to provide either easy Odoo instances where the source is pulled according to\n[ODOO_MANIFEST.yml](./ODOO_MANIFEST.yml), or as a all batteries included devcontainer for VScode.\n\n## Requirements\n\n- [Docker Compose](https://github.com/docker/compose)\n- [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.\n Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)\n- SSH Agent running. (check `echo $SSH_AUTH_SOCK`)\\\n This gets passed trough in the Buildprocess to clone Thirdparty repos.\n\n## Just wanna have a quick and easy Odoo Instance?\n\n```bash\ngit clone https://github.com/OpenJKSoftware/gOdoo\ncd godoo\n. scripts/container_requirements.sh # Check Requirements\ndocker-compose build\ndocker-compose up\n# wait......\n# wait a bit mode ...\n# just a little bit longer ..\n# There we go.\n# Odoo should be reachable on \'https://godoo.docker.localhost\' assuming you didn\'t change .env TRAEFIK_HOST_RULE or COMPOSE_PROJECT_NAME\n```\n\n# Devcontainer\n\n## Features\n\n- All batteries included [Devcontainer](https://code.visualstudio.com/docs/remote/containers) with postgres service\n Container and local DNS resolvig managed by [Traefik](https://doc.traefik.io/traefik/).\n- Easy fully working Odoo instance by `docker-compose up` with https access.\n- `godoo` CLI wrapper around Odoo. (Most flags can be configured by Environment Variables and are already preconfigured\n in the Containers. See [.env.sample](./.env.sample))\n- `odoo-bin` is added to PATH and can thus be invoked from every folder.\n- Odoo will run in Proxy_Mode behind a Traefik reverse proxy for easy access on\n `https://$COMPOSE_PROJECT_NAME.docker.localhost`\n- [Odoo Pylint plugin](https://github.com/OCA/pylint-odoo) preconfigured in vscode\n- Preinstalled vscode Extensions Highlights:\n - [SQL Tools](https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools) with preconfigured connection for\n easy Database access in the Sidebar.\n - [Docker Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) controls\n container host.\n - [Odoo Snippets](https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets)\n - [Odoo Developments](https://marketplace.visualstudio.com/items?itemName=scapigliato.vsc-odoo-development) can Grab\n Odoo Model information from a running Server\n - [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree)\n\n## Usage\n\n1. For Docker on windows: Clone the repo into the WSL2 Filesystem for better IO performance\n2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`\n [Example](https://github.com/joshkreud/traefik_devproxy) \\\n There must be a Docker network called `traefik` that can reach traefik.\n3. Open Devcontianer:\n - If you have the Devcontainer CLI: `devcontainer open .`\n - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`\n4. From **within the container** start Odoo using one of the following commands:\n - You can enable godoo tab-completion by `godoo --install-completion`\n - `make` -> Loads Odoo + Workspace Addons\n - `make bare` -> Loads Odoo with ony `web` installed.\n - `make enterprise` -> godoo launch with `-i web_enterprise` parameter\n - `make kill` -> Search for `odoo-bin` processes and kill them\n - `make reset` -> Drops DB, deletes config file and datafolder\n - The full init script is available via "`godoo`". (See --help for Options)\n5. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\\\n For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)\n6. Login with `admin:admin`\n7. Profit!\n\n### Access to Odoo and Thirdparty addon Source\n\nYou can access the Odoo source by opening the VsCode workspace [full.code-workspace](full.code-workspace) from within\nthe Container. This will open a [Multi-Root Workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).\nReally waiting for https://github.com/microsoft/vscode-remote-release/issues/3665 here.\n\n## Reset Devcontainer Data\n\nWhen you screwed up so bad its time to just start Over godoo has you covered:\n\n### Automatic Reset\n\nThere are 3 Options to reset the Dev Env.\n\n1. From **Outside** the Container run `make reset` in the project root to delete docker volumes and restart the\n container. (Vscode will prompt to reconnect if still open)\n2. From **Outside** the Container run `make reset-hard` in the project root to force rebuild the main Odoo container and\n then do the same as `make reset`\n3. From **Inside** the Container run `make reset` to drop the DB and delete varlib and the bootstrap flag, which is way\n quicker than the other options.\n\n### Manual Reset\n\n1. Close vscode\n2. Remove `app` and `db` container from docker.\n3. Remove volumes: `db, odoo_thirdparty, odoo_web, vscode_extensions`\n4. Restart Devcontainer\n\n## Python Debugging\n\n### VsCode Debugging\n\nDebugging doesn\'t reliably work with\n[Odoo Multiprocess](https://www.odoo.com/documentation/14.0/developer/misc/other/cmdline.html#multiprocessing) mode\nenabled. \\\nThe container ships with a Vscode Debug profile, that sets `--workers 0` to allow for Debugging Breakpoints. See [.vscode/launch.json](./.vscode/launch.json)\n\n### Interactive Shell\n\nUse `godoo shell` to enter an interactive shell on the Database.\n\n# Odoo Modules\n\n## Third Party Modules (manifest.yml)\n\nThe `godoo` bootstrap function, will download some modules using git. \\\nWhich Repos to download is specified in `ODOO_MANIFEST.yml` ([Default](./ODOO_MANIFEST.yml)) \\\nNot all of the cloned addons are automatically installed. \\\nInstall them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\\\nModules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)\n',
|
|
45
|
+
'long_description': '# gOdoo Dev Environment\n\n\n\n\n[<img src="https://raw.githubusercontent.com/OpenJKSoftware/gOdoo/main/assets/godoo-main-cli.png" width="1000"/>](image.png)\n\n**gOdoo** is short for **go Odoo**. \\\nIt is a [Vscode Devcontainer](https://code.visualstudio.com/docs/remote/containers) Environment for [Odoo](https://odoo.com/)\nwith Python CLI `godoo` convenience wrapper around `odoo-bin`.\n\nThis repository is the base source for the Python package [godoo-cli](https://pypi.org/project/godoo-cli/) and serves as\nan all batteries included development environment.\n\nMade Possible by: [WEMPE Elektronic GmbH](https://wetech.de)\n\n# gOdoo-cli\n\nPython package that provides `godoo` command line interface around `odoo-bin`.\n\nIt\'s build with [Typer](https://github.com/tiangolo/typer) to provide some convenience Wrappers for Odoo development and\nDeployment.\n\nMost flags can be configured by Env variables. \\\nUse `godoo --help` to find out more. HINT: Install tab-completion with `godoo --install-completion`\n\n# Docker\n\nThis workspace also contains Docker and Docker-Compose files. \\\n\nThey are used to provide either easy Odoo instances where the source is pulled according to\n[ODOO_MANIFEST.yml](./ODOO_MANIFEST.yml), or as a all batteries included devcontainer for VScode.\n\n## Requirements\n\n- [Docker Compose](https://github.com/docker/compose)\n- [Traefik](https://doc.traefik.io/traefik/) container running with docker provider and "traefik" named docker network.\n Example: [Traefik Devproxy](https://github.com/joshkreud/traefik_devproxy)\n- SSH Agent running. (check `echo $SSH_AUTH_SOCK`)\\\n This gets passed trough in the Buildprocess to clone Thirdparty repos.\n\n## Just wanna have a quick and easy Odoo Instance?\n\n```bash\ngit clone https://github.com/OpenJKSoftware/gOdoo\ncd godoo\n. scripts/container_requirements.sh # Check Requirements\ndocker-compose build\ndocker-compose up\n# wait......\n# wait a bit mode ...\n# just a little bit longer ..\n# There we go.\n# Odoo should be reachable on \'https://godoo.docker.localhost\' assuming you didn\'t change .env TRAEFIK_HOST_RULE or COMPOSE_PROJECT_NAME\n```\n\n# Devcontainer\n\n## Features\n\n- All batteries included [Devcontainer](https://code.visualstudio.com/docs/remote/containers) with postgres service\n Container and local DNS resolvig managed by [Traefik](https://doc.traefik.io/traefik/).\n- Easy fully working Odoo instance by `docker-compose up` with https access.\n- `godoo` CLI wrapper around Odoo. (Most flags can be configured by Environment Variables and are already preconfigured\n in the Containers. See [.env.sample](./.env.sample))\n- `odoo-bin` is added to PATH and can thus be invoked from every folder.\n- Odoo will run in Proxy_Mode behind a Traefik reverse proxy for easy access on\n `https://$COMPOSE_PROJECT_NAME.docker.localhost`\n- [Odoo Pylint plugin](https://github.com/OCA/pylint-odoo) preconfigured in vscode\n- Preinstalled vscode Extensions Highlights:\n - [SQL Tools](https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools) with preconfigured connection for\n easy Database access in the Sidebar.\n - [Docker Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) controls\n container host.\n - [Odoo Snippets](https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets)\n - [Odoo Developments](https://marketplace.visualstudio.com/items?itemName=scapigliato.vsc-odoo-development) can Grab\n Odoo Model information from a running Server\n - [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree)\n\n## Usage\n\n1. For Docker on windows: Clone the repo into the WSL2 Filesystem for better IO performance\n2. Have [Traefik](https://github.com/traefik/traefik) Running on `docker.localhost`\n [Example](https://github.com/joshkreud/traefik_devproxy) \\\n There must be a Docker network called `traefik` that can reach traefik.\n3. Open Devcontianer:\n - If you have the Devcontainer CLI: `devcontainer open .`\n - If not open the workspace in Local Vscode. In the Command pallete search for `Reopen in container`\n4. From **within the container** start Odoo using one of the following commands:\n - You can enable godoo tab-completion by `godoo --install-completion`\n - `make` -> Loads Odoo + Workspace Addons\n - `make bare` -> Loads Odoo with ony `web` installed.\n - `make enterprise` -> godoo launch with `-i web_enterprise` parameter\n - `make kill` -> Search for `odoo-bin` processes and kill them\n - `make reset` -> Drops DB, deletes config file and datafolder\n - The full init script is available via "`godoo`". (See --help for Options)\n5. Open Odoo `https://$COMPOSE_PROJECT_NAME.docker.localhost`\\\n For example `COMPOSE_PROJECT_NAME=godoo` --> [https://godoo.docker.localhost](https://godoo.docker.localhost)\n6. Login with `admin:admin`\n7. Profit!\n\n### Access to Odoo and Thirdparty addon Source\n\nYou can access the Odoo source by opening the VsCode workspace [full.code-workspace](full.code-workspace) from within\nthe Container. This will open a [Multi-Root Workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces).\nReally waiting for https://github.com/microsoft/vscode-remote-release/issues/3665 here.\n\n## Reset Devcontainer Data\n\nWhen you screwed up so bad its time to just start Over godoo has you covered:\n\n### Automatic Reset\n\nThere are 3 Options to reset the Dev Env.\n\n1. From **Outside** the Container run `make reset` in the project root to delete docker volumes and restart the\n container. (Vscode will prompt to reconnect if still open)\n2. From **Outside** the Container run `make reset-hard` in the project root to force rebuild the main Odoo container and\n then do the same as `make reset`\n3. From **Inside** the Container run `make reset` to drop the DB and delete varlib and the bootstrap flag, which is way\n quicker than the other options.\n\n### Manual Reset\n\n1. Close vscode\n2. Remove `app` and `db` container from docker.\n3. Remove volumes: `db, odoo_thirdparty, odoo_web, vscode_extensions`\n4. Restart Devcontainer\n\n## Python Debugging\n\n### VsCode Debugging\n\nDebugging doesn\'t reliably work with\n[Odoo Multiprocess](https://www.odoo.com/documentation/14.0/developer/misc/other/cmdline.html#multiprocessing) mode\nenabled. \\\nThe container ships with a Vscode Debug profile, that sets `--workers 0` to allow for Debugging Breakpoints. See [.vscode/launch.json](./.vscode/launch.json)\n\n### Interactive Shell\n\nUse `godoo shell` to enter an interactive shell on the Database.\n\n# Odoo Modules\n\n## Third Party Modules (manifest.yml)\n\nThe `godoo` bootstrap function, will download some modules using git. \\\nWhich Repos to download is specified in `ODOO_MANIFEST.yml` ([Default](./ODOO_MANIFEST.yml)) \\\nNot all of the cloned addons are automatically installed. \\\nInstall them via the Apps Page in Odoo using `godoo rpc modules install` or using `odoo-bin`.\\\nModules downloaded on the Odoo Marketplace can be dropped as a `.zip` archive in [./thirdparty](./thirdparty)\n',
|
|
46
46
|
'author': 'Joshua Kreuder',
|
|
47
47
|
'author_email': 'Joshua_Kreuder@outlook.com',
|
|
48
48
|
'maintainer': 'None',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.2"
|
|
2
2
|
from .cli import launch_cli
|
|
@@ -6,7 +6,7 @@ from typing import List
|
|
|
6
6
|
import typer
|
|
7
7
|
|
|
8
8
|
from ..helpers.cli import typer_retuner, typer_unpacker
|
|
9
|
-
from ..helpers.odoo_files import get_odoo_addons_in_folder
|
|
9
|
+
from ..helpers.odoo_files import get_addon_paths, get_odoo_addons_in_folder
|
|
10
10
|
from .source_get import get_source
|
|
11
11
|
|
|
12
12
|
LOGGER = logging.getLogger(__name__)
|
|
@@ -94,17 +94,15 @@ def _boostrap_command(
|
|
|
94
94
|
init_modules += [f.name for f in workspace_addons]
|
|
95
95
|
init_cmd = "--init " + ",".join(init_modules) if init_modules else ""
|
|
96
96
|
|
|
97
|
-
addon_paths =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
]
|
|
104
|
-
if thirdparty_addon_paths:
|
|
105
|
-
addon_paths += thirdparty_addon_paths
|
|
106
|
-
|
|
97
|
+
addon_paths = get_addon_paths(
|
|
98
|
+
odoo_main_repo=odoo_main_path,
|
|
99
|
+
workspace_addon_path=workspace_addon_path,
|
|
100
|
+
zip_addon_path=thirdparty_addon_path / "custom", # !Todo Pull out into variable
|
|
101
|
+
thirdparty_addon_path=thirdparty_addon_path,
|
|
102
|
+
)
|
|
103
|
+
addon_paths = [str(p.absolute()) for p in addon_paths]
|
|
107
104
|
addon_paths = ", ".join(list(filter(None, addon_paths)))
|
|
105
|
+
|
|
108
106
|
base_cmds = [
|
|
109
107
|
str(odoo_main_path.absolute()) + "/odoo-bin",
|
|
110
108
|
init_cmd,
|
|
@@ -12,7 +12,7 @@ from ruamel.yaml import YAML
|
|
|
12
12
|
from ..git import GitUrl, git_ensure_addon_repos, git_ensure_odoo_repo
|
|
13
13
|
from ..helpers import download_file
|
|
14
14
|
from ..helpers.cli import typer_unpacker
|
|
15
|
-
from ..helpers.odoo_files import
|
|
15
|
+
from ..helpers.odoo_files import get_addon_paths
|
|
16
16
|
from ..helpers.odoo_manifest import remove_unused_folders
|
|
17
17
|
|
|
18
18
|
LOGGER = logging.getLogger(__name__)
|
|
@@ -70,7 +70,7 @@ def update_odoo_conf_addon_paths(odoo_conf: Path, addon_paths: List[Path]):
|
|
|
70
70
|
@typer_unpacker
|
|
71
71
|
def get_source_file(
|
|
72
72
|
manifest_yml: Path = typer.Option(
|
|
73
|
-
"", envvar="
|
|
73
|
+
"", envvar="ODOO_MANIFEST", help="godoo manifest path, when downloading odoo source (skip repo_url)"
|
|
74
74
|
),
|
|
75
75
|
repo_url: str = typer.Option("", help="git repo url, for specific repo (skip manifest_yml)"),
|
|
76
76
|
file_ref: str = typer.Option("", help="When not using manifest. File Branch, Commit, Tag..."),
|
|
@@ -102,7 +102,7 @@ def get_source_file(
|
|
|
102
102
|
def get_source(
|
|
103
103
|
ctx: typer.Context,
|
|
104
104
|
manifest_yml: Path = typer.Option(
|
|
105
|
-
..., envvar="
|
|
105
|
+
..., envvar="ODOO_MANIFEST", help="Git.yml file, that specified what to download with wich prefix"
|
|
106
106
|
),
|
|
107
107
|
thirdparty_addon_path: Path = typer.Option(
|
|
108
108
|
..., envvar="ODOO_THIRDPARTY_LOCATION", help="Root folder of the Thirdparty addon repos"
|
|
@@ -124,7 +124,7 @@ def get_source(
|
|
|
124
124
|
):
|
|
125
125
|
"""Update Odoo Source and Thirdparty source."""
|
|
126
126
|
LOGGER.info("Updating Source Repos")
|
|
127
|
-
zip_addon_path = thirdparty_addon_path / "custom"
|
|
127
|
+
zip_addon_path = thirdparty_addon_path / "custom" # !Todo Pull out into variable (same in bootstrap)
|
|
128
128
|
|
|
129
129
|
if update_mode in ["all", "zip"]:
|
|
130
130
|
unzip_addons(thirdparty_zip_source, zip_addon_path)
|
|
@@ -153,12 +153,10 @@ def get_source(
|
|
|
153
153
|
)
|
|
154
154
|
|
|
155
155
|
if (conf_path := ctx.obj.odoo_conf_path).exists():
|
|
156
|
-
odoo_addon_paths =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
p for p in thirdparty_addon_path.iterdir() if p.is_dir() and not p.resolve() == zip_addon_path.resolve()
|
|
163
|
-
]
|
|
156
|
+
odoo_addon_paths = get_addon_paths(
|
|
157
|
+
odoo_main_repo=ctx.obj.odoo_main_path,
|
|
158
|
+
workspace_addon_path=ctx.obj.workspace_addon_path,
|
|
159
|
+
zip_addon_path=zip_addon_path,
|
|
160
|
+
thirdparty_addon_path=thirdparty_addon_path,
|
|
161
|
+
)
|
|
164
162
|
update_odoo_conf_addon_paths(odoo_conf=conf_path, addon_paths=odoo_addon_paths)
|
|
@@ -103,3 +103,39 @@ def get_depends_of_modules(addon_path: Path, in_module_paths: List[Path]) -> Lis
|
|
|
103
103
|
added = True
|
|
104
104
|
LOGGER.debug("Found Depends: %s", ", ".join([str(d) for d in out_depends if d not in in_module_paths]))
|
|
105
105
|
return out_depends
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def get_addon_paths(
|
|
109
|
+
odoo_main_repo: Path,
|
|
110
|
+
workspace_addon_path: Path,
|
|
111
|
+
zip_addon_path: Path,
|
|
112
|
+
thirdparty_addon_path: Path,
|
|
113
|
+
) -> List[Path]:
|
|
114
|
+
"""Get Odoo Addon Paths for odoo.conf.
|
|
115
|
+
|
|
116
|
+
Parameters
|
|
117
|
+
----------
|
|
118
|
+
odoo_main_repo : Path
|
|
119
|
+
Path to main odoo repo
|
|
120
|
+
workspace_addon_path : Path
|
|
121
|
+
Path to workspace addons
|
|
122
|
+
zip_addon_path : Path
|
|
123
|
+
path to zip addons
|
|
124
|
+
thirdparty_addon_path : Path
|
|
125
|
+
path to git cloned addon repos
|
|
126
|
+
|
|
127
|
+
Returns
|
|
128
|
+
-------
|
|
129
|
+
List[Path]
|
|
130
|
+
List of valid addon Paths
|
|
131
|
+
"""
|
|
132
|
+
odoo_addon_paths = [odoo_main_repo / "addons"]
|
|
133
|
+
if get_odoo_addons_in_folder(workspace_addon_path):
|
|
134
|
+
odoo_addon_paths.append(workspace_addon_path)
|
|
135
|
+
zip_addon_repos = [f for f in zip_addon_path.iterdir() if f.is_dir() and get_odoo_addons_in_folder(f)]
|
|
136
|
+
odoo_addon_paths += zip_addon_repos
|
|
137
|
+
git_thirdparty_addon_repos = [
|
|
138
|
+
p for p in thirdparty_addon_path.iterdir() if p.is_dir() and not p.resolve() == zip_addon_path.resolve()
|
|
139
|
+
]
|
|
140
|
+
odoo_addon_paths += git_thirdparty_addon_repos
|
|
141
|
+
return odoo_addon_paths
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|