odoo-dev 0.2.3__py3-none-any.whl → 0.2.5__py3-none-any.whl
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.
- odoo_dev/__init__.py +1 -1
- odoo_dev/cli.py +1 -0
- odoo_dev/commands/docker.py +14 -4
- odoo_dev/commands/run.py +6 -6
- odoo_dev/commands/setup.py +137 -19
- odoo_dev/templates/__init__.py +1 -0
- odoo_dev/templates/docker/Dockerfile +79 -0
- odoo_dev/templates/docker/__init__.py +1 -0
- odoo_dev/templates/docker/docker-entrypoint.sh +29 -0
- odoo_dev/templates/vscode/__init__.py +1 -0
- odoo_dev/templates/vscode/launch.json +208 -0
- odoo_dev/templates/vscode/settings.json +19 -0
- odoo_dev/templates/vscode/tasks.json +40 -0
- {odoo_dev-0.2.3.dist-info → odoo_dev-0.2.5.dist-info}/METADATA +2 -1
- odoo_dev-0.2.5.dist-info/RECORD +22 -0
- odoo_dev-0.2.3.dist-info/RECORD +0 -14
- {odoo_dev-0.2.3.dist-info → odoo_dev-0.2.5.dist-info}/WHEEL +0 -0
- {odoo_dev-0.2.3.dist-info → odoo_dev-0.2.5.dist-info}/entry_points.txt +0 -0
odoo_dev/__init__.py
CHANGED
odoo_dev/cli.py
CHANGED
odoo_dev/commands/docker.py
CHANGED
|
@@ -71,6 +71,7 @@ def build(
|
|
|
71
71
|
),
|
|
72
72
|
) -> None:
|
|
73
73
|
"""Rebuild the Odoo Docker image."""
|
|
74
|
+
import importlib.resources
|
|
74
75
|
import shutil
|
|
75
76
|
|
|
76
77
|
cfg = load_config()
|
|
@@ -81,10 +82,19 @@ def build(
|
|
|
81
82
|
build_context.mkdir(parents=True, exist_ok=True)
|
|
82
83
|
|
|
83
84
|
try:
|
|
84
|
-
#
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
# Write Docker templates directly to build context from package
|
|
86
|
+
templates = importlib.resources.files("odoo_dev.templates.docker")
|
|
87
|
+
for filename in ["Dockerfile", "docker-entrypoint.sh"]:
|
|
88
|
+
(build_context / filename).write_text(
|
|
89
|
+
templates.joinpath(filename).read_text()
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# Generate Docker odoo.conf
|
|
93
|
+
from odoo_dev.commands.setup import _generate_docker_odoo_conf
|
|
94
|
+
|
|
95
|
+
(build_context / "odoo.conf").write_text(
|
|
96
|
+
_generate_docker_odoo_conf(community_only=community)
|
|
97
|
+
)
|
|
88
98
|
|
|
89
99
|
# Copy requirements files
|
|
90
100
|
if (cfg.project_dir / "requirements.txt").exists():
|
odoo_dev/commands/run.py
CHANGED
|
@@ -17,10 +17,12 @@ def run(
|
|
|
17
17
|
str | None, typer.Option("-d", "--database", help="Database name")
|
|
18
18
|
] = None,
|
|
19
19
|
install: Annotated[
|
|
20
|
-
str | None,
|
|
20
|
+
str | None,
|
|
21
|
+
typer.Option("-i", "--init", help="Modules to install (comma-separated)"),
|
|
21
22
|
] = None,
|
|
22
23
|
update: Annotated[
|
|
23
|
-
str | None,
|
|
24
|
+
str | None,
|
|
25
|
+
typer.Option("-u", "--update", help="Modules to update (comma-separated)"),
|
|
24
26
|
] = None,
|
|
25
27
|
dev: Annotated[
|
|
26
28
|
str | None,
|
|
@@ -29,9 +31,7 @@ def run(
|
|
|
29
31
|
debug: Annotated[
|
|
30
32
|
bool, typer.Option("--debug", help="Enable debugpy for VSCode debugging")
|
|
31
33
|
] = False,
|
|
32
|
-
port: Annotated[
|
|
33
|
-
int, typer.Option("-p", "--port", help="HTTP port")
|
|
34
|
-
] = 8069,
|
|
34
|
+
port: Annotated[int, typer.Option("-p", "--port", help="HTTP port")] = 8069,
|
|
35
35
|
) -> None:
|
|
36
36
|
"""Run Odoo locally."""
|
|
37
37
|
cfg = load_config()
|
|
@@ -352,9 +352,9 @@ def test(
|
|
|
352
352
|
[
|
|
353
353
|
str(venv_python),
|
|
354
354
|
str(cfg.odoo_bin),
|
|
355
|
-
"db",
|
|
356
355
|
"-c",
|
|
357
356
|
str(cfg.config_file),
|
|
357
|
+
"db",
|
|
358
358
|
"drop",
|
|
359
359
|
db_name,
|
|
360
360
|
],
|
odoo_dev/commands/setup.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"""Setup commands for initializing Odoo development environment."""
|
|
2
2
|
|
|
3
|
+
import importlib.resources
|
|
3
4
|
import os
|
|
5
|
+
import shutil
|
|
4
6
|
import subprocess
|
|
5
7
|
from pathlib import Path
|
|
6
8
|
|
|
@@ -75,12 +77,27 @@ def _update_env_file(env_file: Path, updates: dict[str, str]) -> None:
|
|
|
75
77
|
env_file.write_text(content + "\n")
|
|
76
78
|
|
|
77
79
|
|
|
80
|
+
def _clean():
|
|
81
|
+
cfg = load_config()
|
|
82
|
+
success("Cleaning up current environment...")
|
|
83
|
+
for name in ["odoo", "enterprise", "design-themes", "industry", ".venv"]:
|
|
84
|
+
path = cfg.project_dir / name
|
|
85
|
+
if path.exists():
|
|
86
|
+
shutil.rmtree(path)
|
|
87
|
+
success("Clean up complete.")
|
|
88
|
+
|
|
89
|
+
|
|
78
90
|
def setup(
|
|
79
91
|
community: bool = typer.Option(
|
|
80
92
|
False,
|
|
81
93
|
"--community",
|
|
82
94
|
help="Set up Community edition only (skip Enterprise repos)",
|
|
83
95
|
),
|
|
96
|
+
clean: bool = typer.Option(
|
|
97
|
+
False,
|
|
98
|
+
"--clean",
|
|
99
|
+
help="Clean up before setup (remove existing venv, etc.)",
|
|
100
|
+
),
|
|
84
101
|
) -> None:
|
|
85
102
|
"""Complete setup: clone Odoo repos, configure VSCode, build image."""
|
|
86
103
|
# Prompt for versions if not configured
|
|
@@ -88,6 +105,8 @@ def setup(
|
|
|
88
105
|
|
|
89
106
|
cfg = load_config()
|
|
90
107
|
|
|
108
|
+
if clean:
|
|
109
|
+
_clean()
|
|
91
110
|
success("Setting up complete Odoo development environment...")
|
|
92
111
|
|
|
93
112
|
# Initialize/update git submodules first
|
|
@@ -112,6 +131,9 @@ def setup(
|
|
|
112
131
|
# Prompt for Docker setup
|
|
113
132
|
warning("\nDo you want to set up the Docker environment?")
|
|
114
133
|
if typer.confirm("Continue with Docker setup?", default=True):
|
|
134
|
+
# Set up Docker files first
|
|
135
|
+
_setup_docker_files(cfg, community_only=community)
|
|
136
|
+
|
|
115
137
|
success("\nBuilding Docker image...")
|
|
116
138
|
from odoo_dev.commands.docker import build
|
|
117
139
|
|
|
@@ -207,25 +229,23 @@ def vscode(cfg=None) -> None:
|
|
|
207
229
|
vscode_dir = cfg.project_dir / ".vscode"
|
|
208
230
|
vscode_dir.mkdir(exist_ok=True)
|
|
209
231
|
|
|
210
|
-
|
|
232
|
+
# Get the templates directory from the package
|
|
233
|
+
templates = importlib.resources.files("odoo_dev.templates.vscode")
|
|
211
234
|
|
|
212
235
|
# Copy template files
|
|
213
|
-
import shutil
|
|
214
|
-
|
|
215
236
|
for template_file in ["launch.json", "tasks.json"]:
|
|
216
|
-
|
|
237
|
+
template_content = templates.joinpath(template_file).read_text()
|
|
217
238
|
dst = vscode_dir / template_file
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
success(f"Copied {template_file}")
|
|
239
|
+
dst.write_text(template_content)
|
|
240
|
+
success(f"Copied {template_file}")
|
|
221
241
|
|
|
222
242
|
# Only copy settings.json if it doesn't exist
|
|
223
|
-
settings_src = template_dir / "settings.json"
|
|
224
243
|
settings_dst = vscode_dir / "settings.json"
|
|
225
|
-
if
|
|
226
|
-
|
|
244
|
+
if not settings_dst.exists():
|
|
245
|
+
settings_content = templates.joinpath("settings.json").read_text()
|
|
246
|
+
settings_dst.write_text(settings_content)
|
|
227
247
|
success("Copied settings.json")
|
|
228
|
-
|
|
248
|
+
else:
|
|
229
249
|
warning("settings.json already exists. Skipping.")
|
|
230
250
|
|
|
231
251
|
success("VSCode configuration set up successfully!")
|
|
@@ -298,6 +318,85 @@ db_password = odoo
|
|
|
298
318
|
success(f"Config file created at {conf_file}")
|
|
299
319
|
|
|
300
320
|
|
|
321
|
+
def _setup_docker_files(cfg, community_only: bool = False) -> None:
|
|
322
|
+
"""Copy Docker templates to .odoo-deploy directory."""
|
|
323
|
+
success("Setting up Docker files...")
|
|
324
|
+
|
|
325
|
+
# Create .odoo-deploy directory
|
|
326
|
+
cfg.script_dir.mkdir(exist_ok=True)
|
|
327
|
+
|
|
328
|
+
# Get the templates directory from the package
|
|
329
|
+
templates = importlib.resources.files("odoo_dev.templates.docker")
|
|
330
|
+
|
|
331
|
+
# Copy Dockerfile and docker-entrypoint.sh
|
|
332
|
+
for filename in ["Dockerfile", "docker-entrypoint.sh"]:
|
|
333
|
+
template_content = templates.joinpath(filename).read_text()
|
|
334
|
+
dest = cfg.script_dir / filename
|
|
335
|
+
dest.write_text(template_content)
|
|
336
|
+
if filename.endswith(".sh"):
|
|
337
|
+
dest.chmod(0o755)
|
|
338
|
+
success(f"Copied {filename}")
|
|
339
|
+
|
|
340
|
+
# Create Docker odoo.conf
|
|
341
|
+
_setup_docker_odoo_config(cfg, community_only=community_only)
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def _generate_docker_odoo_conf(community_only: bool = False) -> str:
|
|
345
|
+
"""Generate Docker-specific odoo.conf content."""
|
|
346
|
+
# Build addons path for Docker (using /opt/project paths)
|
|
347
|
+
addons_paths = [
|
|
348
|
+
"/opt/project/odoo/addons",
|
|
349
|
+
"/opt/project/odoo/odoo/addons",
|
|
350
|
+
]
|
|
351
|
+
|
|
352
|
+
if not community_only:
|
|
353
|
+
addons_paths.append("/opt/project/enterprise")
|
|
354
|
+
|
|
355
|
+
addons_paths.extend(
|
|
356
|
+
[
|
|
357
|
+
"/opt/project/design-themes",
|
|
358
|
+
"/opt/project/industry",
|
|
359
|
+
"/opt/project/addons",
|
|
360
|
+
]
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
return f"""[options]
|
|
364
|
+
addons_path = {",".join(addons_paths)}
|
|
365
|
+
admin_passwd = admin
|
|
366
|
+
db_host = db
|
|
367
|
+
db_port = 5432
|
|
368
|
+
db_user = odoo
|
|
369
|
+
db_password = odoo
|
|
370
|
+
http_port = 8069
|
|
371
|
+
gevent_port = 8072
|
|
372
|
+
proxy_mode = True
|
|
373
|
+
dev_mode = True
|
|
374
|
+
log_level = info
|
|
375
|
+
list_db = True
|
|
376
|
+
limit_memory_hard = 0
|
|
377
|
+
limit_memory_soft = 2147483648
|
|
378
|
+
limit_time_cpu = 600
|
|
379
|
+
limit_time_real = 1200
|
|
380
|
+
workers = 0
|
|
381
|
+
max_cron_threads = 1
|
|
382
|
+
data_dir = /opt/odoo-filestore
|
|
383
|
+
"""
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
def _setup_docker_odoo_config(cfg, community_only: bool = False) -> None:
|
|
387
|
+
"""Create Docker-specific odoo.conf configuration file."""
|
|
388
|
+
conf_file = cfg.docker_config_file
|
|
389
|
+
|
|
390
|
+
if conf_file.exists():
|
|
391
|
+
warning(f"Docker config file already exists at {conf_file}")
|
|
392
|
+
return
|
|
393
|
+
|
|
394
|
+
success("Creating Docker Odoo configuration file...")
|
|
395
|
+
conf_file.write_text(_generate_docker_odoo_conf(community_only=community_only))
|
|
396
|
+
conf_file.chmod(0o600)
|
|
397
|
+
success(f"Docker config file created at {conf_file}")
|
|
398
|
+
|
|
399
|
+
|
|
301
400
|
def _clone_odoo_repos(cfg, community_only: bool = False) -> None:
|
|
302
401
|
"""Clone or update Odoo repositories."""
|
|
303
402
|
success("Setting up Odoo repositories...")
|
|
@@ -305,22 +404,25 @@ def _clone_odoo_repos(cfg, community_only: bool = False) -> None:
|
|
|
305
404
|
if community_only:
|
|
306
405
|
warning("Community edition mode: Enterprise repositories will be skipped")
|
|
307
406
|
|
|
407
|
+
# Use HTTPS for odoo (public), SSH for all others (private)
|
|
308
408
|
repos = [
|
|
309
|
-
(
|
|
310
|
-
(f"git@github.com:odoo/design-themes.git", "design-themes", cfg.odoo_version),
|
|
409
|
+
("https://github.com/odoo/odoo.git", "odoo", cfg.odoo_version),
|
|
311
410
|
]
|
|
312
411
|
|
|
313
|
-
#
|
|
412
|
+
# Private repos require SSH
|
|
413
|
+
repos.append(
|
|
414
|
+
("git@github.com:odoo/design-themes.git", "design-themes", cfg.odoo_version)
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
# Add enterprise if not community only (private repo, needs SSH)
|
|
314
418
|
if not community_only:
|
|
315
419
|
repos.append(
|
|
316
|
-
(
|
|
420
|
+
("git@github.com:odoo/enterprise.git", "enterprise", cfg.odoo_version)
|
|
317
421
|
)
|
|
318
422
|
|
|
319
|
-
# Add industry for Odoo 18+
|
|
423
|
+
# Add industry for Odoo 18+ (private repo)
|
|
320
424
|
if cfg.odoo_version.startswith("18") or cfg.odoo_version.startswith("19"):
|
|
321
|
-
repos.append(
|
|
322
|
-
(f"git@github.com:odoo/industry.git", "industry", cfg.odoo_version)
|
|
323
|
-
)
|
|
425
|
+
repos.append(("git@github.com:odoo/industry.git", "industry", cfg.odoo_version))
|
|
324
426
|
|
|
325
427
|
for repo_url, repo_dir, branch in repos:
|
|
326
428
|
repo_path = cfg.project_dir / repo_dir
|
|
@@ -355,6 +457,15 @@ def _clone_odoo_repos(cfg, community_only: bool = False) -> None:
|
|
|
355
457
|
success("Odoo repositories setup complete.")
|
|
356
458
|
|
|
357
459
|
|
|
460
|
+
def _can_sudo_without_password() -> bool:
|
|
461
|
+
"""Check if sudo can run without prompting for password."""
|
|
462
|
+
result = subprocess.run(
|
|
463
|
+
["sudo", "-n", "true"],
|
|
464
|
+
capture_output=True,
|
|
465
|
+
)
|
|
466
|
+
return result.returncode == 0
|
|
467
|
+
|
|
468
|
+
|
|
358
469
|
def _install_system_dependencies() -> None:
|
|
359
470
|
"""Install system dependencies based on OS."""
|
|
360
471
|
import platform
|
|
@@ -376,6 +487,13 @@ def _install_system_dependencies() -> None:
|
|
|
376
487
|
check=False,
|
|
377
488
|
)
|
|
378
489
|
elif system == "Linux":
|
|
490
|
+
if not _can_sudo_without_password():
|
|
491
|
+
warning(
|
|
492
|
+
"Cannot run sudo without password. "
|
|
493
|
+
"Please install system dependencies manually or run with sudo."
|
|
494
|
+
)
|
|
495
|
+
return
|
|
496
|
+
|
|
379
497
|
success("Installing dependencies for Linux...")
|
|
380
498
|
subprocess.run(
|
|
381
499
|
[
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Templates package for odoo-dev
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
ARG PYTHON_VERSION=3.12
|
|
2
|
+
FROM python:${PYTHON_VERSION}-slim-bookworm
|
|
3
|
+
|
|
4
|
+
ARG ODOO_VERSION=17.0
|
|
5
|
+
|
|
6
|
+
# Install uv for fast package management
|
|
7
|
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
8
|
+
|
|
9
|
+
# Install system dependencies
|
|
10
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
11
|
+
build-essential \
|
|
12
|
+
curl \
|
|
13
|
+
dirmngr \
|
|
14
|
+
fonts-noto-cjk \
|
|
15
|
+
gnupg \
|
|
16
|
+
libldap2-dev \
|
|
17
|
+
libpq-dev \
|
|
18
|
+
libsasl2-dev \
|
|
19
|
+
libssl-dev \
|
|
20
|
+
libxml2-dev \
|
|
21
|
+
libxslt1-dev \
|
|
22
|
+
node-less \
|
|
23
|
+
npm \
|
|
24
|
+
python3-num2words \
|
|
25
|
+
python3-pdfminer \
|
|
26
|
+
python3-phonenumbers \
|
|
27
|
+
python3-pyldap \
|
|
28
|
+
python3-qrcode \
|
|
29
|
+
python3-renderpm \
|
|
30
|
+
python3-setuptools \
|
|
31
|
+
python3-slugify \
|
|
32
|
+
python3-vobject \
|
|
33
|
+
python3-watchdog \
|
|
34
|
+
python3-xlrd \
|
|
35
|
+
python3-xlwt \
|
|
36
|
+
xz-utils \
|
|
37
|
+
postgresql-client \
|
|
38
|
+
git \
|
|
39
|
+
&& apt-get clean \
|
|
40
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
41
|
+
|
|
42
|
+
# Install wkhtmltopdf
|
|
43
|
+
RUN curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \
|
|
44
|
+
&& apt-get update && apt-get install -y --no-install-recommends ./wkhtmltox.deb \
|
|
45
|
+
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
|
|
46
|
+
|
|
47
|
+
# Install debugpy
|
|
48
|
+
RUN uv pip install --system --no-cache debugpy
|
|
49
|
+
|
|
50
|
+
# Create odoo user and directories
|
|
51
|
+
RUN useradd -ms /bin/bash -d /opt/odoo odoo && \
|
|
52
|
+
mkdir -p /var/lib/odoo && \
|
|
53
|
+
mkdir -p /opt/odoo-filestore && \
|
|
54
|
+
mkdir -p /etc/odoo && \
|
|
55
|
+
chown -R odoo:odoo /var/lib/odoo /opt/odoo-filestore /etc/odoo
|
|
56
|
+
|
|
57
|
+
# Create project directory for mounted project files
|
|
58
|
+
RUN mkdir -p /opt/project && chown -R odoo:odoo /opt/project
|
|
59
|
+
|
|
60
|
+
# Copy requirements files
|
|
61
|
+
COPY odoo-requirements.txt /tmp/odoo-requirements.txt
|
|
62
|
+
COPY requirements.txt /tmp/requirements.txt
|
|
63
|
+
|
|
64
|
+
# Install Python dependencies
|
|
65
|
+
RUN uv pip install --system --no-cache -r /tmp/odoo-requirements.txt
|
|
66
|
+
RUN uv pip install --system --no-cache -r /tmp/requirements.txt
|
|
67
|
+
|
|
68
|
+
# Copy entrypoint script
|
|
69
|
+
COPY ./docker-entrypoint.sh /
|
|
70
|
+
RUN chmod +x /docker-entrypoint.sh
|
|
71
|
+
|
|
72
|
+
# Set default config
|
|
73
|
+
COPY ./odoo.conf /etc/odoo/
|
|
74
|
+
RUN chown odoo:odoo /etc/odoo/odoo.conf
|
|
75
|
+
|
|
76
|
+
# Set the default command
|
|
77
|
+
USER odoo
|
|
78
|
+
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
79
|
+
CMD ["odoo"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Docker templates package
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Set default config file
|
|
6
|
+
CONFIG_FILE=${ODOO_CONFIG_FILE:-"/etc/odoo/odoo.conf"}
|
|
7
|
+
|
|
8
|
+
# Function to wait for PostgreSQL to be ready
|
|
9
|
+
wait_for_db() {
|
|
10
|
+
echo "Waiting for PostgreSQL..."
|
|
11
|
+
while ! pg_isready -h $HOST -p 5432 -U $USER; do
|
|
12
|
+
sleep 1
|
|
13
|
+
done
|
|
14
|
+
echo "PostgreSQL is ready!"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
# Wait for PostgreSQL if it's the main command
|
|
18
|
+
if [ "$1" = 'odoo' ]; then
|
|
19
|
+
wait_for_db
|
|
20
|
+
|
|
21
|
+
echo "Starting Odoo with debugpy enabled on port 5678"
|
|
22
|
+
# Run Odoo with debugpy enabled (without waiting for client)
|
|
23
|
+
# Shift to remove the first argument ('odoo') so it's not passed to odoo-bin
|
|
24
|
+
shift
|
|
25
|
+
exec python -m debugpy --listen 0.0.0.0:5678 /opt/project/odoo/odoo-bin -c "$CONFIG_FILE" "$@"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# If we're not running Odoo, just execute the command
|
|
29
|
+
exec "$@"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# VSCode templates package
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"id": "modules",
|
|
6
|
+
"description": "Module name to update (comma-separated for multiple, or 'all')",
|
|
7
|
+
"default": "all",
|
|
8
|
+
"type": "promptString"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "database",
|
|
12
|
+
"description": "Database to upgrade.",
|
|
13
|
+
"default": "",
|
|
14
|
+
"type": "promptString"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "testTags",
|
|
18
|
+
"description": "Test tag to pass to odoo-bin command",
|
|
19
|
+
"default": "",
|
|
20
|
+
"type": "promptString"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"configurations": [
|
|
24
|
+
{
|
|
25
|
+
"name": "Odoo Local: Debug",
|
|
26
|
+
"type": "debugpy",
|
|
27
|
+
"request": "launch",
|
|
28
|
+
"program": "${workspaceFolder}/odoo/odoo-bin",
|
|
29
|
+
"console": "integratedTerminal",
|
|
30
|
+
"args": [
|
|
31
|
+
"-c",
|
|
32
|
+
"${workspaceFolder}/conf/odoo.conf"
|
|
33
|
+
],
|
|
34
|
+
"env": {
|
|
35
|
+
"PYTHONWARNINGS": "ignore:FutureWarning",
|
|
36
|
+
"GEVENT_SUPPORT": "True"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Odoo Local: Upgrade",
|
|
41
|
+
"type": "debugpy",
|
|
42
|
+
"request": "launch",
|
|
43
|
+
"program": "${workspaceFolder}/odoo/odoo-bin",
|
|
44
|
+
"console": "integratedTerminal",
|
|
45
|
+
"args": [
|
|
46
|
+
"-c",
|
|
47
|
+
"${workspaceFolder}/conf/odoo.conf",
|
|
48
|
+
"-u",
|
|
49
|
+
"${input:modules}",
|
|
50
|
+
"-d",
|
|
51
|
+
"${input:database}",
|
|
52
|
+
"--no-http",
|
|
53
|
+
"--stop-after-init"
|
|
54
|
+
],
|
|
55
|
+
"env": {
|
|
56
|
+
"PYTHONWARNINGS": "ignore:FutureWarning",
|
|
57
|
+
"GEVENT_SUPPORT": "True"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "Odoo Local: Integration Test",
|
|
62
|
+
"type": "debugpy",
|
|
63
|
+
"request": "launch",
|
|
64
|
+
"program": "${workspaceFolder}/odoo/odoo-bin",
|
|
65
|
+
"console": "integratedTerminal",
|
|
66
|
+
"args": [
|
|
67
|
+
"-c",
|
|
68
|
+
"${workspaceFolder}/conf/odoo.conf",
|
|
69
|
+
"-u",
|
|
70
|
+
"${input:modules}",
|
|
71
|
+
"-i",
|
|
72
|
+
"${input:modules}",
|
|
73
|
+
"--test-enable",
|
|
74
|
+
"-d",
|
|
75
|
+
"${input:database}",
|
|
76
|
+
"--stop-after-init",
|
|
77
|
+
"--no-http"
|
|
78
|
+
],
|
|
79
|
+
"env": {
|
|
80
|
+
"PYTHONWARNINGS": "ignore:FutureWarning",
|
|
81
|
+
"GEVENT_SUPPORT": "True"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "Odoo Local: Test",
|
|
86
|
+
"type": "debugpy",
|
|
87
|
+
"request": "launch",
|
|
88
|
+
"program": "${workspaceFolder}/odoo/odoo-bin",
|
|
89
|
+
"console": "integratedTerminal",
|
|
90
|
+
"args": [
|
|
91
|
+
"-c",
|
|
92
|
+
"${workspaceFolder}/conf/odoo.conf",
|
|
93
|
+
"-u",
|
|
94
|
+
"${input:modules}",
|
|
95
|
+
"-i",
|
|
96
|
+
"${input:modules}",
|
|
97
|
+
"--test-tags",
|
|
98
|
+
"${input:testTags}",
|
|
99
|
+
"-d",
|
|
100
|
+
"${input:database}",
|
|
101
|
+
"--stop-after-init",
|
|
102
|
+
"--no-http"
|
|
103
|
+
],
|
|
104
|
+
"env": {
|
|
105
|
+
"PYTHONWARNINGS": "ignore:FutureWarning",
|
|
106
|
+
"GEVENT_SUPPORT": "True"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "Odoo Docker: Debug",
|
|
111
|
+
"type": "debugpy",
|
|
112
|
+
"request": "attach",
|
|
113
|
+
"connect": {
|
|
114
|
+
"port": 5678,
|
|
115
|
+
"host": "localhost"
|
|
116
|
+
},
|
|
117
|
+
"pathMappings": [
|
|
118
|
+
{
|
|
119
|
+
"localRoot": "${workspaceFolder}",
|
|
120
|
+
"remoteRoot": "/opt/project"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"localRoot": "${workspaceFolder}/odoo",
|
|
124
|
+
"remoteRoot": "/opt/project/odoo"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"localRoot": "${workspaceFolder}/enterprise",
|
|
128
|
+
"remoteRoot": "/opt/project/enterprise"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"localRoot": "${workspaceFolder}/addons",
|
|
132
|
+
"remoteRoot": "/opt/project/addons"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"localRoot": "${workspaceFolder}/industry",
|
|
136
|
+
"remoteRoot": "/opt/project/industry"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"justMyCode": false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "Odoo Docker: Update Module",
|
|
143
|
+
"type": "debugpy",
|
|
144
|
+
"request": "attach",
|
|
145
|
+
"connect": {
|
|
146
|
+
"port": 5678,
|
|
147
|
+
"host": "localhost"
|
|
148
|
+
},
|
|
149
|
+
"pathMappings": [
|
|
150
|
+
{
|
|
151
|
+
"localRoot": "${workspaceFolder}",
|
|
152
|
+
"remoteRoot": "/opt/project"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"localRoot": "${workspaceFolder}/odoo",
|
|
156
|
+
"remoteRoot": "/opt/project/odoo"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"localRoot": "${workspaceFolder}/enterprise",
|
|
160
|
+
"remoteRoot": "/opt/project/enterprise"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"localRoot": "${workspaceFolder}/addons",
|
|
164
|
+
"remoteRoot": "/opt/project/addons"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"localRoot": "${workspaceFolder}/industry",
|
|
168
|
+
"remoteRoot": "/opt/project/industry"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"preLaunchTask": "Update Module",
|
|
172
|
+
"justMyCode": false
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "Odoo Docker: Shell",
|
|
176
|
+
"type": "debugpy",
|
|
177
|
+
"request": "attach",
|
|
178
|
+
"connect": {
|
|
179
|
+
"port": 5678,
|
|
180
|
+
"host": "localhost"
|
|
181
|
+
},
|
|
182
|
+
"pathMappings": [
|
|
183
|
+
{
|
|
184
|
+
"localRoot": "${workspaceFolder}",
|
|
185
|
+
"remoteRoot": "/opt/project"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"localRoot": "${workspaceFolder}/odoo",
|
|
189
|
+
"remoteRoot": "/opt/project/odoo"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"localRoot": "${workspaceFolder}/enterprise",
|
|
193
|
+
"remoteRoot": "/opt/project/enterprise"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"localRoot": "${workspaceFolder}/addons",
|
|
197
|
+
"remoteRoot": "/opt/project/addons"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"localRoot": "${workspaceFolder}/industry",
|
|
201
|
+
"remoteRoot": "/opt/project/industry"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"preLaunchTask": "Start Odoo Shell",
|
|
205
|
+
"justMyCode": false
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
|
|
3
|
+
"python": {
|
|
4
|
+
"editor.defaultFormatter": "ms-python.black-formatter",
|
|
5
|
+
"editor.formatOnSave": true,
|
|
6
|
+
"analysis.typeCheckingMode": "standard"
|
|
7
|
+
},
|
|
8
|
+
"editor.formatOnSave": true,
|
|
9
|
+
"debugpy.debugOptions": [
|
|
10
|
+
"RedirectOutput"
|
|
11
|
+
],
|
|
12
|
+
"docker.host": "unix:///var/run/docker.sock",
|
|
13
|
+
|
|
14
|
+
"python.linting.enabled": true,
|
|
15
|
+
"remote.containers.defaultExtensions": [
|
|
16
|
+
"ms-python.python",
|
|
17
|
+
"windsurf.pyright"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"label": "Update Module",
|
|
6
|
+
"type": "shell",
|
|
7
|
+
"command": "odoo-dev docker restart",
|
|
8
|
+
"presentation": {
|
|
9
|
+
"reveal": "always",
|
|
10
|
+
"panel": "new"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"label": "Start Odoo Shell",
|
|
15
|
+
"type": "shell",
|
|
16
|
+
"command": "odoo-dev docker shell ${input:database}",
|
|
17
|
+
"presentation": {
|
|
18
|
+
"reveal": "always",
|
|
19
|
+
"panel": "new"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"label": "Restart Odoo",
|
|
24
|
+
"type": "shell",
|
|
25
|
+
"command": "odoo-dev docker restart",
|
|
26
|
+
"presentation": {
|
|
27
|
+
"reveal": "always",
|
|
28
|
+
"panel": "new"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"inputs": [
|
|
33
|
+
{
|
|
34
|
+
"id": "database",
|
|
35
|
+
"description": "Database name",
|
|
36
|
+
"default": "",
|
|
37
|
+
"type": "promptString"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: odoo-dev
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Odoo Development Environment Helper
|
|
5
5
|
Project-URL: Homepage, https://git.bemade.org/bemade/odoo-dev
|
|
6
6
|
Project-URL: Repository, https://git.bemade.org/bemade/odoo-dev
|
|
7
7
|
Project-URL: Issues, https://git.bemade.org/bemade/odoo-dev/-/issues
|
|
8
|
+
License-Expression: LGPL-3.0
|
|
8
9
|
Requires-Python: >=3.12
|
|
9
10
|
Requires-Dist: rich>=13.0.0
|
|
10
11
|
Requires-Dist: typer>=0.9.0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
odoo_dev/__init__.py,sha256=B4WMNYsTgLRFzlApYRgp77Raih3F5bsI19733zhUq_g,66
|
|
2
|
+
odoo_dev/cli.py,sha256=KTiGXvjc0szLI-uAy3WFCL-0SouuNdtulnv5hWZj514,1200
|
|
3
|
+
odoo_dev/config.py,sha256=tZ_aDAsHeDSFs6fLwdn974UzTIPAR3DHBLmdvO4jyeM,2977
|
|
4
|
+
odoo_dev/commands/__init__.py,sha256=yOxitS1Oes2ZS95F0nXyw3LDOBXCFWmudZInYbTu1eQ,33
|
|
5
|
+
odoo_dev/commands/db.py,sha256=7DnI28y2YpugnjoMkyTYymLMZ5MjNagfD6T15RWvZ0c,9605
|
|
6
|
+
odoo_dev/commands/docker.py,sha256=S3rP8KNteP89PrdRbhDNCS7o1dEJGiQfbjnxqDjq7HQ,5721
|
|
7
|
+
odoo_dev/commands/run.py,sha256=FbsbImEzNrwAz4QXWW6jbDWtdilMzn5EUK9LDQqUBx0,11886
|
|
8
|
+
odoo_dev/commands/setup.py,sha256=aben3-U2UjeGnJRJFcK2yqJkhmgNnhfjeQSsRbkj01c,16918
|
|
9
|
+
odoo_dev/templates/__init__.py,sha256=FdigXGAd_wWIoOYG6PE-bdvWNxAnpweGCnJyedRi8pc,33
|
|
10
|
+
odoo_dev/templates/docker/Dockerfile,sha256=7mCF35_x7bH7pFEG5OzCXYlReeK0Hg0ENvlE9dmBAIo,2165
|
|
11
|
+
odoo_dev/templates/docker/__init__.py,sha256=AplQ8t8UTwUAs813hziZKR_ZamuYKMJ6r4vQynFQMMw,27
|
|
12
|
+
odoo_dev/templates/docker/docker-entrypoint.sh,sha256=KjNtBa6bfhc-QNzhj4lgogDWfzEYTUTiOQ8pV63COiQ,788
|
|
13
|
+
odoo_dev/templates/vscode/__init__.py,sha256=ptqVrSMVMYbHoGHZ3LOVj9-cNphE-pY9UKbaEcRQqn8,27
|
|
14
|
+
odoo_dev/templates/vscode/launch.json,sha256=RbbC3i4PnldblGpFDiiNKG1H4cFZC3uSzIkSyz7Fzb8,6646
|
|
15
|
+
odoo_dev/templates/vscode/settings.json,sha256=CEqFD7D35R2If_kbnB2xyTA9YA8upv8t0gNibw9gozI,540
|
|
16
|
+
odoo_dev/templates/vscode/tasks.json,sha256=T7j3cwIL4Dj8JbsBRYyiUWNsplbWmuBfTBN-JPFZXCc,992
|
|
17
|
+
odoo_dev/utils/__init__.py,sha256=EDPdElYZN3cPJtZIkNjXFoItz1mPBPUsasQzb6mRrss,36
|
|
18
|
+
odoo_dev/utils/console.py,sha256=bRbXVD15QiMhdU8Rp4cyaoA1-J8vFX8r16TwsYurUug,549
|
|
19
|
+
odoo_dev-0.2.5.dist-info/METADATA,sha256=cReUNF6QmEBX0F56C-nFtNqcCwzwcyhwepLKsY2seho,3463
|
|
20
|
+
odoo_dev-0.2.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
21
|
+
odoo_dev-0.2.5.dist-info/entry_points.txt,sha256=EKJCgGArQtoRNYRBRcbkRfIXO_APFkYujr2u8-UCfXo,46
|
|
22
|
+
odoo_dev-0.2.5.dist-info/RECORD,,
|
odoo_dev-0.2.3.dist-info/RECORD
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
odoo_dev/__init__.py,sha256=wuxFg6cuL7l3w16lVrMBuXIL4mnnXh7a5XdckE5anIM,66
|
|
2
|
-
odoo_dev/cli.py,sha256=2KdvrUNka57MWN9W98SHScG_PsY1ENKqleTPwcnyW3Q,1199
|
|
3
|
-
odoo_dev/config.py,sha256=tZ_aDAsHeDSFs6fLwdn974UzTIPAR3DHBLmdvO4jyeM,2977
|
|
4
|
-
odoo_dev/commands/__init__.py,sha256=yOxitS1Oes2ZS95F0nXyw3LDOBXCFWmudZInYbTu1eQ,33
|
|
5
|
-
odoo_dev/commands/db.py,sha256=7DnI28y2YpugnjoMkyTYymLMZ5MjNagfD6T15RWvZ0c,9605
|
|
6
|
-
odoo_dev/commands/docker.py,sha256=I5dvxRX4uHzwBwTM7d7yhMphge8fdKoqjXCKo_-7FQw,5386
|
|
7
|
-
odoo_dev/commands/run.py,sha256=FPi_rIyMOWadZfMPin0TXHbdBcW1YIuqUseBEhr4PnE,11882
|
|
8
|
-
odoo_dev/commands/setup.py,sha256=lRgjMm38_JrazgOiSr7_MF9BlI1G5lOtQobmM30WN0U,13366
|
|
9
|
-
odoo_dev/utils/__init__.py,sha256=EDPdElYZN3cPJtZIkNjXFoItz1mPBPUsasQzb6mRrss,36
|
|
10
|
-
odoo_dev/utils/console.py,sha256=bRbXVD15QiMhdU8Rp4cyaoA1-J8vFX8r16TwsYurUug,549
|
|
11
|
-
odoo_dev-0.2.3.dist-info/METADATA,sha256=t9YSuqcUDxOT1nHmGQ200yCfTum173DqTlPqUB9_lA0,3434
|
|
12
|
-
odoo_dev-0.2.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
13
|
-
odoo_dev-0.2.3.dist-info/entry_points.txt,sha256=EKJCgGArQtoRNYRBRcbkRfIXO_APFkYujr2u8-UCfXo,46
|
|
14
|
-
odoo_dev-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|