gOdoo-cli 0.10.2__tar.gz → 0.10.3__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.
Files changed (49) hide show
  1. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/PKG-INFO +1 -1
  2. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/pyproject.toml +1 -1
  3. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/test/test_load_data.py +0 -5
  4. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/test/test_run.py +21 -8
  5. godoo_cli-0.10.3/src/godoo_cli/version.py +1 -0
  6. godoo_cli-0.10.2/src/godoo_cli/version.py +0 -1
  7. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/LICENSE +0 -0
  8. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/README.md +0 -0
  9. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/__init__.py +0 -0
  10. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/__main__.py +0 -0
  11. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/cli.py +0 -0
  12. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/cli_common.py +0 -0
  13. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/__init__.py +0 -0
  14. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/backup/__init__.py +0 -0
  15. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/backup/cli.py +0 -0
  16. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/backup/dump.py +0 -0
  17. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/backup/load.py +0 -0
  18. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/backup/pull.py +0 -0
  19. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/backup/util.py +0 -0
  20. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/bootstrap.py +0 -0
  21. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/config.py +0 -0
  22. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/db/__init__.py +0 -0
  23. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/db/cli.py +0 -0
  24. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/db/connection.py +0 -0
  25. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/db/passwords.py +0 -0
  26. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/db/query.py +0 -0
  27. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/launch.py +0 -0
  28. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/rpc/__init__.py +0 -0
  29. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/rpc/cli.py +0 -0
  30. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/rpc/config_parameters.py +0 -0
  31. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/rpc/importer.py +0 -0
  32. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/rpc/modules.py +0 -0
  33. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/rpc/translations.py +0 -0
  34. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/shell.py +0 -0
  35. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/source_get.py +0 -0
  36. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/test/__init__.py +0 -0
  37. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/commands/test/cli.py +0 -0
  38. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/git/__init__.py +0 -0
  39. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/git/git_odoo.py +0 -0
  40. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/git/git_odoo_addons.py +0 -0
  41. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/git/git_repo.py +0 -0
  42. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/git/git_url.py +0 -0
  43. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/git/zip_download.py +0 -0
  44. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/helpers/__init__.py +0 -0
  45. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/helpers/bootstrap.py +0 -0
  46. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/helpers/cli.py +0 -0
  47. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/helpers/odoo_files.py +0 -0
  48. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/src/godoo_cli/helpers/odoo_manifest.py +0 -0
  49. {godoo_cli-0.10.2 → godoo_cli-0.10.3}/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.10.2
3
+ Version: 0.10.3
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gOdoo-cli"
3
- version = "0.10.2"
3
+ version = "0.10.3"
4
4
  description = "Wrapper around Odoo-Bin with some convinience RPC functions."
5
5
  authors = ["Joshua Kreuder <Joshua_Kreuder@outlook.com>"]
6
6
  license = "LGPL-3"
@@ -34,11 +34,6 @@ def odoo_load_test_data(
34
34
  multithread_worker_count=CLI.odoo_launch.multithread_worker_count,
35
35
  ):
36
36
  """Run tests.data.generate_test_data fnction in Odoo shell for given modules. Ensures Modules are installed and odoo is bootstrapped"""
37
-
38
- if not test_modules:
39
- LOGGER.info("Nothing to Test. Skipping.")
40
- return
41
-
42
37
  module_list_csv = ",".join(test_modules)
43
38
 
44
39
  LOGGER.info("Installing Test data for Odoo Modules:\n%s", sorted(test_modules))
@@ -7,7 +7,12 @@ import typer
7
7
  from typing_extensions import Annotated
8
8
 
9
9
  from ...cli_common import CommonCLI
10
- from ...helpers.odoo_files import get_changed_modules_and_depends, get_odoo_module_paths
10
+ from ...helpers.odoo_files import (
11
+ get_addon_paths,
12
+ get_changed_modules_and_depends,
13
+ get_depends_of_module,
14
+ get_odoo_module_paths,
15
+ )
11
16
  from ...helpers.system import run_cmd
12
17
  from ..db.connection import DBConnection
13
18
  from ..launch import pre_launch
@@ -19,6 +24,7 @@ LOGGER = logging.getLogger(__name__)
19
24
 
20
25
  def _test_modules_special_cases(in_modules: List[str], workspace_addon_path: Path):
21
26
  if len(in_modules) == 1:
27
+ # In _modules could be a command
22
28
  out_modules = []
23
29
  command = in_modules[0]
24
30
  if command == "all":
@@ -30,6 +36,8 @@ def _test_modules_special_cases(in_modules: List[str], workspace_addon_path: Pat
30
36
  addon_path=workspace_addon_path,
31
37
  )
32
38
  out_modules = changed_modules
39
+ else:
40
+ return in_modules
33
41
  return [p.stem for p in out_modules]
34
42
  return in_modules
35
43
 
@@ -75,6 +83,13 @@ def odoo_run_tests(
75
83
  """Bootstrap or Launch odoo in Testing Mode. Exits after Run, so no webserver is started. (Will set weird odoo.conf if it needs to bootstrap)"""
76
84
 
77
85
  test_modules = _test_modules_special_cases(test_modules, workspace_addon_path)
86
+ addon_paths = get_addon_paths(odoo_main_path, workspace_addon_path, thirdparty_addon_path)
87
+ all_modules = get_odoo_module_paths(addon_paths)
88
+ depends = []
89
+ for module in test_modules:
90
+ module_path = next((p for p in all_modules if p.stem == module), None)
91
+ depends += get_depends_of_module(all_modules, module_path)
92
+ depends = list(set(depends))
78
93
 
79
94
  if skip_test_modules:
80
95
  skip_test_modules = [
@@ -92,13 +107,11 @@ def odoo_run_tests(
92
107
  module_list = ",".join(test_modules)
93
108
 
94
109
  LOGGER.info("Testing Odoo Modules:\n%s", sorted(test_modules))
95
-
96
- bootstrap_args = [
97
- f"--init {module_list}",
98
- f"--log-level {odoo_log_level}",
99
- ]
100
- if re.search("(sale|account)", test_module_list, re.IGNORECASE):
101
- bootstrap_args[0] += ",l10n_generic_coa"
110
+ if "account" in [p.stem for p in depends]:
111
+ bootstrap_args = [f"--init {module_list},l10n_generic_coa"]
112
+ else:
113
+ bootstrap_args = [f"--init {module_list}"]
114
+ bootstrap_args.append(f"--log-level {odoo_log_level}")
102
115
 
103
116
  launch_args = [
104
117
  f"-u {module_list}",
@@ -0,0 +1 @@
1
+ __version__ = "0.10.3"
@@ -1 +0,0 @@
1
- __version__ = "0.10.2"
File without changes
File without changes