odoo-dev 0.1.0__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 (63) hide show
  1. odoo_dev-0.1.0/.gitignore +37 -0
  2. odoo_dev-0.1.0/.gitmodules +3 -0
  3. odoo_dev-0.1.0/.python-version +1 -0
  4. odoo_dev-0.1.0/PKG-INFO +133 -0
  5. odoo_dev-0.1.0/README.md +124 -0
  6. odoo_dev-0.1.0/pyproject.toml +38 -0
  7. odoo_dev-0.1.0/src/odoo_dev/__init__.py +3 -0
  8. odoo_dev-0.1.0/src/odoo_dev/cli.py +36 -0
  9. odoo_dev-0.1.0/src/odoo_dev/commands/__init__.py +1 -0
  10. odoo_dev-0.1.0/src/odoo_dev/commands/db.py +332 -0
  11. odoo_dev-0.1.0/src/odoo_dev/commands/docker.py +196 -0
  12. odoo_dev-0.1.0/src/odoo_dev/commands/run.py +432 -0
  13. odoo_dev-0.1.0/src/odoo_dev/commands/setup.py +364 -0
  14. odoo_dev-0.1.0/src/odoo_dev/config.py +101 -0
  15. odoo_dev-0.1.0/src/odoo_dev/utils/__init__.py +1 -0
  16. odoo_dev-0.1.0/src/odoo_dev/utils/console.py +25 -0
  17. odoo_dev-0.1.0/tests/__init__.py +0 -0
  18. odoo_dev-0.1.0/tests/fixtures/__init__.py +0 -0
  19. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.git +1 -0
  20. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.gitignore +77 -0
  21. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.gitlab-ci.yml +8 -0
  22. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.gitmodules +5 -0
  23. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/.git +1 -0
  24. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/.gitignore +6 -0
  25. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/Dockerfile +77 -0
  26. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/Makefile +21 -0
  27. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/README.md +194 -0
  28. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/compose.yaml +53 -0
  29. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/docker-entrypoint.sh +29 -0
  30. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/install.sh +84 -0
  31. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/odoo-dev.sh +1280 -0
  32. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/templates/odoo.conf +22 -0
  33. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/templates/vscode/launch.json +184 -0
  34. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/templates/vscode/settings.json +19 -0
  35. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/templates/vscode/tasks.json +40 -0
  36. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.odoo-deploy/uninstall.sh +52 -0
  37. odoo_dev-0.1.0/tests/fixtures/odoo-empty/.repos/.gitkeep +0 -0
  38. odoo_dev-0.1.0/tests/fixtures/odoo-empty/Notes/Warning Upgrade all +45 -0
  39. odoo_dev-0.1.0/tests/fixtures/odoo-empty/README.md +0 -0
  40. odoo_dev-0.1.0/tests/fixtures/odoo-empty/addons/.gitkeep +0 -0
  41. odoo_dev-0.1.0/tests/fixtures/odoo-empty/note.txt +331 -0
  42. odoo_dev-0.1.0/tests/fixtures/odoo-empty/requirements.txt +0 -0
  43. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/abstorelsymlink.sh +12 -0
  44. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/adaptation.md +99 -0
  45. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/after_migration.sh +13 -0
  46. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/checkout2 +17 -0
  47. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/cleanup.sql +60 -0
  48. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/deploy +108 -0
  49. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/fix_mail_templates.sql +18 -0
  50. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/gitpull +17 -0
  51. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/main.py +467 -0
  52. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/modules_cleanup.sql +58 -0
  53. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/post-upgrade steps.md +78 -0
  54. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/pre_commit_hook.py +64 -0
  55. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/requirements.txt +3 -0
  56. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/test +62 -0
  57. odoo_dev-0.1.0/tests/fixtures/odoo-empty/tools/update_addon_versions.py +23 -0
  58. odoo_dev-0.1.0/tests/test_cli.py +65 -0
  59. odoo_dev-0.1.0/tests/test_config.py +131 -0
  60. odoo_dev-0.1.0/tests/test_db.py +46 -0
  61. odoo_dev-0.1.0/tests/test_integration.py +331 -0
  62. odoo_dev-0.1.0/tests/test_run.py +42 -0
  63. odoo_dev-0.1.0/uv.lock +166 -0
@@ -0,0 +1,37 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ dist/
9
+ wheels/
10
+ *.egg-info/
11
+ *.egg
12
+ .eggs/
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+ ENV/
18
+
19
+ # Testing
20
+ .pytest_cache/
21
+ .coverage
22
+ htmlcov/
23
+ coverage_html/
24
+
25
+ # IDE
26
+ .idea/
27
+ .vscode/
28
+ *.swp
29
+ *.swo
30
+ *~
31
+
32
+ # OS
33
+ .DS_Store
34
+ Thumbs.db
35
+
36
+ # uv
37
+ .uv/
@@ -0,0 +1,3 @@
1
+ [submodule "tests/fixtures/odoo-empty"]
2
+ path = tests/fixtures/odoo-empty
3
+ url = git@git.bemade.org:bemade/odoo-empty
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,133 @@
1
+ Metadata-Version: 2.4
2
+ Name: odoo-dev
3
+ Version: 0.1.0
4
+ Summary: Odoo Development Environment Helper
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: rich>=13.0.0
7
+ Requires-Dist: typer>=0.9.0
8
+ Description-Content-Type: text/markdown
9
+
10
+ # odoo-dev
11
+
12
+ A CLI tool for managing Odoo development environments. Handles local Python setup, Docker containers, database operations, and more.
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ # Install with uv (recommended)
18
+ uv tool install odoo-dev
19
+
20
+ # Or with pip
21
+ pip install odoo-dev
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ```bash
27
+ # In your Odoo project directory
28
+ cd my-odoo-project
29
+
30
+ # Full setup: clone Odoo repos, create venv, configure VSCode
31
+ odoo-dev setup
32
+
33
+ # Or for community edition only
34
+ odoo-dev setup --community
35
+ ```
36
+
37
+ ## Commands
38
+
39
+ ### Local Development (default)
40
+
41
+ ```bash
42
+ odoo-dev run # Start Odoo locally
43
+ odoo-dev run -d mydb --dev reload # With hot reload
44
+ odoo-dev run --debug # With debugpy (VSCode attach)
45
+ odoo-dev shell mydb # Open Odoo shell
46
+ odoo-dev update base -d mydb # Update modules
47
+ odoo-dev test my_module # Run tests with coverage
48
+ odoo-dev scaffold my_module # Create new module
49
+ ```
50
+
51
+ ### Database Operations
52
+
53
+ ```bash
54
+ odoo-dev db list # List databases
55
+ odoo-dev db restore backup.zip # Restore from backup
56
+ odoo-dev db restore backup.zip mydb --no-neutralize
57
+ odoo-dev db drop mydb # Drop database
58
+ odoo-dev db neutralize mydb # Disable emails/crons
59
+ ```
60
+
61
+ ### Docker (optional)
62
+
63
+ ```bash
64
+ odoo-dev docker start # Start containers
65
+ odoo-dev docker stop # Stop containers
66
+ odoo-dev docker logs # View logs
67
+ odoo-dev docker build # Rebuild image
68
+ odoo-dev docker shell mydb # Shell in container
69
+ odoo-dev docker psql # PostgreSQL shell
70
+ ```
71
+
72
+ ### Setup Commands
73
+
74
+ ```bash
75
+ odoo-dev setup # Full setup
76
+ odoo-dev setup --community # Community edition only
77
+ odoo-dev setup-venv # Just create venv
78
+ odoo-dev vscode # Configure VSCode debugging
79
+ ```
80
+
81
+ ## Project Structure
82
+
83
+ odoo-dev expects this project structure:
84
+
85
+ ```
86
+ my-odoo-project/
87
+ ├── .env # Optional: ODOO_VERSION, PYTHON_VERSION
88
+ ├── addons/ # Your custom addons
89
+ ├── requirements.txt # Project-specific Python deps
90
+ ├── odoo/ # Cloned by setup
91
+ ├── enterprise/ # Cloned by setup (unless --community)
92
+ ├── design-themes/ # Cloned by setup
93
+ ├── .venv/ # Created by setup
94
+ └── conf/
95
+ └── odoo.conf # Created by setup
96
+ ```
97
+
98
+ ## Configuration
99
+
100
+ Create a `.env` file in your project root:
101
+
102
+ ```bash
103
+ ODOO_VERSION=18.0
104
+ PYTHON_VERSION=3.12
105
+ ```
106
+
107
+ ## Requirements
108
+
109
+ - Python 3.12+
110
+ - uv (recommended) or pip
111
+ - Git
112
+ - PostgreSQL (for local development)
113
+ - Docker (optional, for containerized development)
114
+
115
+ ## Development
116
+
117
+ ```bash
118
+ # Clone and install for development
119
+ git clone git@git.bemade.org:bemade/odoo-dev.git
120
+ cd odoo-dev
121
+ uv sync
122
+
123
+ # Run tests
124
+ uv run pytest # All tests
125
+ uv run pytest -m "not slow" # Fast tests only
126
+
127
+ # Build
128
+ uv build
129
+ ```
130
+
131
+ ## License
132
+
133
+ MIT
@@ -0,0 +1,124 @@
1
+ # odoo-dev
2
+
3
+ A CLI tool for managing Odoo development environments. Handles local Python setup, Docker containers, database operations, and more.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # Install with uv (recommended)
9
+ uv tool install odoo-dev
10
+
11
+ # Or with pip
12
+ pip install odoo-dev
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # In your Odoo project directory
19
+ cd my-odoo-project
20
+
21
+ # Full setup: clone Odoo repos, create venv, configure VSCode
22
+ odoo-dev setup
23
+
24
+ # Or for community edition only
25
+ odoo-dev setup --community
26
+ ```
27
+
28
+ ## Commands
29
+
30
+ ### Local Development (default)
31
+
32
+ ```bash
33
+ odoo-dev run # Start Odoo locally
34
+ odoo-dev run -d mydb --dev reload # With hot reload
35
+ odoo-dev run --debug # With debugpy (VSCode attach)
36
+ odoo-dev shell mydb # Open Odoo shell
37
+ odoo-dev update base -d mydb # Update modules
38
+ odoo-dev test my_module # Run tests with coverage
39
+ odoo-dev scaffold my_module # Create new module
40
+ ```
41
+
42
+ ### Database Operations
43
+
44
+ ```bash
45
+ odoo-dev db list # List databases
46
+ odoo-dev db restore backup.zip # Restore from backup
47
+ odoo-dev db restore backup.zip mydb --no-neutralize
48
+ odoo-dev db drop mydb # Drop database
49
+ odoo-dev db neutralize mydb # Disable emails/crons
50
+ ```
51
+
52
+ ### Docker (optional)
53
+
54
+ ```bash
55
+ odoo-dev docker start # Start containers
56
+ odoo-dev docker stop # Stop containers
57
+ odoo-dev docker logs # View logs
58
+ odoo-dev docker build # Rebuild image
59
+ odoo-dev docker shell mydb # Shell in container
60
+ odoo-dev docker psql # PostgreSQL shell
61
+ ```
62
+
63
+ ### Setup Commands
64
+
65
+ ```bash
66
+ odoo-dev setup # Full setup
67
+ odoo-dev setup --community # Community edition only
68
+ odoo-dev setup-venv # Just create venv
69
+ odoo-dev vscode # Configure VSCode debugging
70
+ ```
71
+
72
+ ## Project Structure
73
+
74
+ odoo-dev expects this project structure:
75
+
76
+ ```
77
+ my-odoo-project/
78
+ ├── .env # Optional: ODOO_VERSION, PYTHON_VERSION
79
+ ├── addons/ # Your custom addons
80
+ ├── requirements.txt # Project-specific Python deps
81
+ ├── odoo/ # Cloned by setup
82
+ ├── enterprise/ # Cloned by setup (unless --community)
83
+ ├── design-themes/ # Cloned by setup
84
+ ├── .venv/ # Created by setup
85
+ └── conf/
86
+ └── odoo.conf # Created by setup
87
+ ```
88
+
89
+ ## Configuration
90
+
91
+ Create a `.env` file in your project root:
92
+
93
+ ```bash
94
+ ODOO_VERSION=18.0
95
+ PYTHON_VERSION=3.12
96
+ ```
97
+
98
+ ## Requirements
99
+
100
+ - Python 3.12+
101
+ - uv (recommended) or pip
102
+ - Git
103
+ - PostgreSQL (for local development)
104
+ - Docker (optional, for containerized development)
105
+
106
+ ## Development
107
+
108
+ ```bash
109
+ # Clone and install for development
110
+ git clone git@git.bemade.org:bemade/odoo-dev.git
111
+ cd odoo-dev
112
+ uv sync
113
+
114
+ # Run tests
115
+ uv run pytest # All tests
116
+ uv run pytest -m "not slow" # Fast tests only
117
+
118
+ # Build
119
+ uv build
120
+ ```
121
+
122
+ ## License
123
+
124
+ MIT
@@ -0,0 +1,38 @@
1
+ [project]
2
+ name = "odoo-dev"
3
+ version = "0.1.0"
4
+ description = "Odoo Development Environment Helper"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "typer>=0.9.0",
9
+ "rich>=13.0.0",
10
+ ]
11
+
12
+ [project.scripts]
13
+ odoo-dev = "odoo_dev.cli:app"
14
+
15
+ [dependency-groups]
16
+ dev = [
17
+ "pytest>=8.0.0",
18
+ ]
19
+
20
+ [tool.pytest.ini_options]
21
+ markers = [
22
+ "slow: marks tests as slow (deselect with '-m \"not slow\"')",
23
+ ]
24
+ testpaths = ["tests"]
25
+ norecursedirs = [
26
+ "tests/fixtures/odoo-empty/odoo",
27
+ "tests/fixtures/odoo-empty/enterprise",
28
+ "tests/fixtures/odoo-empty/design-themes",
29
+ "tests/fixtures/odoo-empty/industry",
30
+ "tests/fixtures/odoo-empty/.venv",
31
+ ]
32
+
33
+ [build-system]
34
+ requires = ["hatchling"]
35
+ build-backend = "hatchling.build"
36
+
37
+ [tool.hatch.build.targets.wheel]
38
+ packages = ["src/odoo_dev"]
@@ -0,0 +1,3 @@
1
+ """Odoo Development Environment Helper."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,36 @@
1
+ """Main CLI entry point for odoo-dev."""
2
+
3
+ import typer
4
+
5
+ from odoo_dev.commands import db, docker, run, setup
6
+
7
+ app = typer.Typer(
8
+ name="odoo-dev",
9
+ help="Odoo Development Environment Helper",
10
+ no_args_is_help=True,
11
+ )
12
+
13
+ # Command groups
14
+ app.add_typer(db.app, name="db")
15
+ app.add_typer(docker.app, name="docker")
16
+
17
+ # Setup commands
18
+ app.command()(setup.setup)
19
+ app.command(name="setup-venv")(setup.setup_venv)
20
+ app.command()(setup.vscode)
21
+
22
+ # Local runtime commands (the defaults)
23
+ app.command()(run.run)
24
+ app.command()(run.shell)
25
+ app.command()(run.update)
26
+ app.command()(run.test)
27
+ app.command()(run.scaffold)
28
+
29
+
30
+ def main() -> None:
31
+ """Entry point for the CLI."""
32
+ app()
33
+
34
+
35
+ if __name__ == "__main__":
36
+ main()
@@ -0,0 +1 @@
1
+ """CLI commands for odoo-dev."""