gOdoo-cli 0.3.7__tar.gz → 0.3.8__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.3.7 → godoo_cli-0.3.8}/PKG-INFO +12 -12
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/pyproject.toml +1 -1
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/setup.py +1 -1
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/rpc/modules.py +9 -4
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/helpers/odoo_files.py +13 -2
- godoo_cli-0.3.8/src/godoo_cli/version.py +1 -0
- godoo_cli-0.3.7/src/godoo_cli/version.py +0 -1
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/LICENSE +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/README.md +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/__init__.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/__main__.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/cli.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/__init__.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/bootstrap.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/config.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/launch.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/rpc/__init__.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/rpc/cli.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/rpc/cli_callbacks.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/rpc/importer.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/rpc/translations.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/shell.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/source_get.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/commands/test.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/git/__init__.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/git/git_odoo.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/git/git_odoo_addons.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/git/git_repo.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/git/git_url.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/git/zip_download.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/helpers/__init__.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/helpers/bootstrap.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/helpers/cli.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/helpers/odoo_manifest.py +0 -0
- {godoo_cli-0.3.7 → godoo_cli-0.3.8}/src/godoo_cli/helpers/system.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: godoo-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Wrapper around Odoo-Bin with some convinience RPC functions.
|
|
5
5
|
Home-page: https://github.com/OpenJKSoftware/gOdoo
|
|
6
6
|
License: LGPL-3
|
|
@@ -15,24 +15,24 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Provides-Extra: codequality
|
|
17
17
|
Provides-Extra: devcontainer
|
|
18
|
-
Requires-Dist: black (>=22.10.0,<23.0.0); extra == "codequality"
|
|
19
|
-
Requires-Dist: debugpy (>=1.6.0,<2.0.0); extra == "devcontainer"
|
|
20
|
-
Requires-Dist: flake8 (>=5.0.4,<6.0.0); extra == "codequality"
|
|
18
|
+
Requires-Dist: black (>=22.10.0,<23.0.0) ; extra == "codequality"
|
|
19
|
+
Requires-Dist: debugpy (>=1.6.0,<2.0.0) ; extra == "devcontainer"
|
|
20
|
+
Requires-Dist: flake8 (>=5.0.4,<6.0.0) ; extra == "codequality"
|
|
21
21
|
Requires-Dist: gitpython (>=3.1.27,<4.0.0)
|
|
22
22
|
Requires-Dist: godoo-rpc (==0.0.3)
|
|
23
|
-
Requires-Dist: inotify (>=0.2.10,<0.3.0); extra == "devcontainer"
|
|
24
|
-
Requires-Dist: ipdb (>=0.13.9,<0.14.0); extra == "devcontainer"
|
|
25
|
-
Requires-Dist: isort (>=5.10.1,<6.0.0); extra == "codequality"
|
|
23
|
+
Requires-Dist: inotify (>=0.2.10,<0.3.0) ; extra == "devcontainer"
|
|
24
|
+
Requires-Dist: ipdb (>=0.13.9,<0.14.0) ; extra == "devcontainer"
|
|
25
|
+
Requires-Dist: isort (>=5.10.1,<6.0.0) ; extra == "codequality"
|
|
26
26
|
Requires-Dist: openupgradelib (>=3.3.4,<4.0.0)
|
|
27
|
-
Requires-Dist: pre-commit (>=2.20.0,<3.0.0); extra == "devcontainer"
|
|
28
|
-
Requires-Dist: py-spy (>=0.3.11,<0.4.0); extra == "devcontainer"
|
|
29
|
-
Requires-Dist: pylint-odoo (>=8.0.16,<9.0.0); extra == "codequality"
|
|
27
|
+
Requires-Dist: pre-commit (>=2.20.0,<3.0.0) ; extra == "devcontainer"
|
|
28
|
+
Requires-Dist: py-spy (>=0.3.11,<0.4.0) ; extra == "devcontainer"
|
|
29
|
+
Requires-Dist: pylint-odoo (>=8.0.16,<9.0.0) ; extra == "codequality"
|
|
30
30
|
Requires-Dist: python-dotenv (>=0.20.0,<0.21.0)
|
|
31
31
|
Requires-Dist: rich (>=12.6.0,<13.0.0)
|
|
32
|
-
Requires-Dist: rope (>=0.23.0,<0.24.0); extra == "devcontainer"
|
|
32
|
+
Requires-Dist: rope (>=0.23.0,<0.24.0) ; extra == "devcontainer"
|
|
33
33
|
Requires-Dist: ruamel-yaml (>=0.17.21,<0.18.0)
|
|
34
34
|
Requires-Dist: typer[all] (>=0.7.0,<0.8.0)
|
|
35
|
-
Requires-Dist: watchdog (>=2.1.7,<3.0.0); extra == "devcontainer"
|
|
35
|
+
Requires-Dist: watchdog (>=2.1.7,<3.0.0) ; extra == "devcontainer"
|
|
36
36
|
Project-URL: Repository, https://github.com/OpenJKSoftware/gOdoo
|
|
37
37
|
Description-Content-Type: text/markdown
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ entry_points = \
|
|
|
41
41
|
|
|
42
42
|
setup_kwargs = {
|
|
43
43
|
'name': 'godoo-cli',
|
|
44
|
-
'version': '0.3.
|
|
44
|
+
'version': '0.3.8',
|
|
45
45
|
'description': 'Wrapper around Odoo-Bin with some convinience RPC functions.',
|
|
46
46
|
'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 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',
|
|
47
47
|
'author': 'Joshua Kreuder',
|
|
@@ -44,8 +44,11 @@ def rpc_get_modules(odoo_api: OdooApiWrapper, module_query: str, valid_module_na
|
|
|
44
44
|
base_domain.insert(1, "&")
|
|
45
45
|
base_domain.append(("name", "in", valid_module_names))
|
|
46
46
|
|
|
47
|
+
LOGGER.debug("Searching for Modules with Domain: %s", base_domain + search_domain)
|
|
47
48
|
if ids := mod_env.search(base_domain + search_domain):
|
|
48
|
-
|
|
49
|
+
modules = mod_env.browse(ids)
|
|
50
|
+
LOGGER.debug("Found Modules: %s", [(m.id, m.name, m.state) for m in modules])
|
|
51
|
+
return modules
|
|
49
52
|
|
|
50
53
|
|
|
51
54
|
def rpc_install_modules(
|
|
@@ -62,14 +65,16 @@ def rpc_install_modules(
|
|
|
62
65
|
Upgrade module if already installed, by default True
|
|
63
66
|
"""
|
|
64
67
|
did_something = False
|
|
65
|
-
|
|
66
|
-
if install_module_ids
|
|
68
|
+
install_module_ids = [m.id for m in modules if m.state == "uninstalled"]
|
|
69
|
+
if install_module_ids:
|
|
67
70
|
install_modules = modules.browse(install_module_ids)
|
|
68
71
|
LOGGER.info("Installing Module: " + ", ".join(install_modules.mapped("name")))
|
|
69
72
|
install_modules.button_immediate_install()
|
|
70
73
|
did_something = True
|
|
71
74
|
|
|
72
|
-
if upgrade and (
|
|
75
|
+
if upgrade and (
|
|
76
|
+
up_module_ids := [m.id for m in modules if m.state == "installed" and m.id not in install_module_ids]
|
|
77
|
+
):
|
|
73
78
|
up_modules = modules.browse(up_module_ids)
|
|
74
79
|
LOGGER.info("Updating Module: " + ", ".join(up_modules.mapped("name")))
|
|
75
80
|
up_modules.button_immediate_upgrade()
|
|
@@ -13,6 +13,10 @@ def get_zip_addon_path(thirdparty_path: Path) -> Path:
|
|
|
13
13
|
return thirdparty_path / "custom"
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
def folder_is_odoo_module(folder: Path):
|
|
17
|
+
return folder.is_dir() and any(folder.glob("__manifest__.py"))
|
|
18
|
+
|
|
19
|
+
|
|
16
20
|
def get_odoo_module_paths(search_folders: Union[List[Path], Path]) -> List[Path]:
|
|
17
21
|
"""List all Valid odoo module names in one or many Odoo addons folder.
|
|
18
22
|
|
|
@@ -34,7 +38,7 @@ def get_odoo_module_paths(search_folders: Union[List[Path], Path]) -> List[Path]
|
|
|
34
38
|
if not folder.exists():
|
|
35
39
|
return
|
|
36
40
|
for folder in folder.iterdir():
|
|
37
|
-
if
|
|
41
|
+
if folder_is_odoo_module(folder):
|
|
38
42
|
module_paths.append(folder)
|
|
39
43
|
return module_paths
|
|
40
44
|
|
|
@@ -65,7 +69,14 @@ def get_changed_modules(
|
|
|
65
69
|
path = git_root / change.split("\t")[1]
|
|
66
70
|
if addon_path in path.parents:
|
|
67
71
|
changed_module_files.append(path)
|
|
68
|
-
|
|
72
|
+
|
|
73
|
+
changed_module_folders = []
|
|
74
|
+
for f in changed_module_files:
|
|
75
|
+
for pf in f.parents:
|
|
76
|
+
if pf.absolute() == addon_path.absolute():
|
|
77
|
+
break
|
|
78
|
+
if pf.absolute() not in changed_module_folders and folder_is_odoo_module(pf):
|
|
79
|
+
changed_module_folders.append(pf.absolute())
|
|
69
80
|
if changed_module_folders:
|
|
70
81
|
LOGGER.debug(
|
|
71
82
|
"Found Modules changed to branch '%s':\n %s",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.8"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.7"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|