gOdoo-cli 0.15.0__tar.gz → 0.16.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.
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/PKG-INFO +1 -1
- godoo_cli-0.16.0/config/nginx-proxy_headers.conf +13 -0
- godoo_cli-0.16.0/config/nginx.conf +116 -0
- godoo_cli-0.16.0/config/postgresql.conf +75 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/Dockerfile +4 -2
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/depends_build.sh +1 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/odoo_manifest.yml +9 -3
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/__about__.py +1 -1
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/db/query.py +4 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/bootstrap.py +3 -2
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/cli_generate.py +17 -8
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/godoo_test/test_run.py +2 -1
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/shell.py +5 -5
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/source_get.py +54 -26
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/git/__init__.py +0 -2
- godoo_cli-0.16.0/src/godoo_cli/git/git_odoo_addons.py +133 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/git/git_repo.py +4 -2
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/helpers/modules_py.py +25 -4
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/helpers/pip.py +3 -3
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/models/__init__.py +2 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/models/db_connection.py +4 -2
- godoo_cli-0.16.0/src/godoo_cli/models/godoo_git_repo.py +184 -0
- godoo_cli-0.16.0/src/godoo_cli/models/godoo_manifest.py +230 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/models/godoo_models.py +17 -1
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/models/godoo_modules.py +3 -2
- godoo_cli-0.15.0/config/nginx.conf +0 -86
- godoo_cli-0.15.0/config/postgresql.conf +0 -18
- godoo_cli-0.15.0/src/godoo_cli/git/git_odoo.py +0 -81
- godoo_cli-0.15.0/src/godoo_cli/git/git_odoo_addons.py +0 -110
- godoo_cli-0.15.0/src/godoo_cli/helpers/odoo_manifest.py +0 -133
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.codecovrc +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.devcontainer/devcontainer.json +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.env.sample +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.eslintignore +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.eslintrc.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.github/FUNDING.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.github/workflows/README.md +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.github/workflows/quality.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.github/workflows/version-bump.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.github/workflows/version-publish.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.gitignore +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.pre-commit-config.yaml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.prettierrc.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/.vscode/launch.json +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/LICENSE +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/README.md +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/addons/.gitkeep +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/addons/godoo_test_succ_mod/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/addons/godoo_test_succ_mod/__manifest__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/addons/godoo_test_succ_mod/models/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/addons/godoo_test_succ_mod/tests/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/addons/godoo_test_succ_mod/tests/data.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/addons/godoo_test_succ_mod/tests/test_succ.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/assets/godoo-main-cli.png +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/assets/odoo_logo.png +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/config/supervisord.conf +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/cups/Dockerfile +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/cups/config/cups-pdf.conf +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/cups/config/cupsd.conf +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/cups/cups_entrypoint.sh +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/depends_runtime.sh +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/docker-compose.base.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/docker-compose.devcontainer-traefik.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/docker-compose.devcontainer.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/docker-compose.traefik.yml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/docker/psql.gpg +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/godoo_src.code-workspace +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/makefile +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/pyproject.toml +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/scripts/container_requirements.sh +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/scripts/launchodoo.sh +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/scripts/migrations/development/shrink_database.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/scripts/reset_devcontainer.sh +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/__main__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/cli.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/cli_common.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/backup/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/backup/cli.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/backup/dump.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/backup/load.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/backup/pull.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/backup/util.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/config.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/db/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/db/cli.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/db/passwords.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/godoo_test/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/godoo_test/cli.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/godoo_test/test_load_data.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/launch.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/shell_scripts/odoo_banner.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/rpc/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/rpc/cli.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/rpc/config_parameters.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/rpc/importer.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/rpc/modules.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/rpc/translations.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/git/git_url.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/git/zip_download.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/helpers/__init__.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/helpers/cli.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/helpers/modules_git.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/helpers/odoo_files.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/helpers/system.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/tests/test_git_clone.py +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/thirdparty/.gitkeep +0 -0
- {godoo_cli-0.15.0 → godoo_cli-0.16.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gOdoo-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: Wrapper around Odoo-Bin with some convinience RPC functions.
|
|
5
5
|
Project-URL: repository, https://github.com/OpenJKSoftware/gOdoo
|
|
6
6
|
Author-email: Joshua Kreuder <Joshua_Kreuder@outlook.com>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
2
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
3
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
4
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
5
|
+
proxy_set_header Connection $connection_upgrade;
|
|
6
|
+
proxy_set_header X-Forwarded-Host $host;
|
|
7
|
+
|
|
8
|
+
# Enable HTTP/1.1 keepalive to upstream
|
|
9
|
+
proxy_http_version 1.1;
|
|
10
|
+
proxy_set_header Connection "";
|
|
11
|
+
|
|
12
|
+
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
|
|
13
|
+
proxy_cookie_flags session_id samesite=lax secure; # requires nginx 1.19.8
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
worker_processes 4;
|
|
2
|
+
# user www-data;
|
|
3
|
+
pid /var/log/nginx/nginx.pid;
|
|
4
|
+
error_log /var/log/nginx/error.log info;
|
|
5
|
+
|
|
6
|
+
events {
|
|
7
|
+
use epoll;
|
|
8
|
+
worker_connections 1000;
|
|
9
|
+
multi_accept on; # Accept multiple connections at once
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
http {
|
|
13
|
+
include /etc/nginx/mime.types;
|
|
14
|
+
server_tokens off;
|
|
15
|
+
|
|
16
|
+
# Performance: Buffering and keepalive
|
|
17
|
+
sendfile on;
|
|
18
|
+
tcp_nopush on;
|
|
19
|
+
tcp_nodelay on;
|
|
20
|
+
keepalive_timeout 65;
|
|
21
|
+
keepalive_requests 1000;
|
|
22
|
+
|
|
23
|
+
# Performance: Buffer sizes for Odoo's large responses
|
|
24
|
+
proxy_buffer_size 128k;
|
|
25
|
+
proxy_buffers 4 256k;
|
|
26
|
+
proxy_busy_buffers_size 256k;
|
|
27
|
+
|
|
28
|
+
# Gzip compression (moved here for all responses)
|
|
29
|
+
gzip on;
|
|
30
|
+
gzip_vary on;
|
|
31
|
+
gzip_proxied any;
|
|
32
|
+
gzip_comp_level 6;
|
|
33
|
+
gzip_min_length 1000;
|
|
34
|
+
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript application/x-javascript text/javascript image/svg+xml;
|
|
35
|
+
|
|
36
|
+
#odoo server
|
|
37
|
+
upstream odoo {
|
|
38
|
+
server 127.0.0.1:8069;
|
|
39
|
+
keepalive 32; # Keep connections to Odoo open
|
|
40
|
+
}
|
|
41
|
+
upstream odoochat {
|
|
42
|
+
server 127.0.0.1:8072;
|
|
43
|
+
keepalive 8;
|
|
44
|
+
}
|
|
45
|
+
map $http_upgrade $connection_upgrade {
|
|
46
|
+
default upgrade;
|
|
47
|
+
'' close;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
map $sent_http_content_type $content_type_csp {
|
|
51
|
+
default "";
|
|
52
|
+
~image/ "default-src 'none'";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
set_real_ip_from 10.1.0.0/16;
|
|
56
|
+
set_real_ip_from 172.20.0.0/24;
|
|
57
|
+
real_ip_header X-Forwarded-For;
|
|
58
|
+
real_ip_recursive on;
|
|
59
|
+
|
|
60
|
+
server {
|
|
61
|
+
listen 80;
|
|
62
|
+
|
|
63
|
+
proxy_read_timeout 720s;
|
|
64
|
+
proxy_connect_timeout 720s;
|
|
65
|
+
proxy_send_timeout 720s;
|
|
66
|
+
client_max_body_size 4G; # Set the maximum upload size to 4 gigabytes
|
|
67
|
+
|
|
68
|
+
add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
|
|
69
|
+
|
|
70
|
+
# Redirect websocket requests to odoo gevent port
|
|
71
|
+
location /websocket {
|
|
72
|
+
proxy_pass http://odoochat;
|
|
73
|
+
include /etc/nginx/proxy_headers.conf;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# Redirect requests to odoo backend server
|
|
77
|
+
location / {
|
|
78
|
+
proxy_pass http://odoo;
|
|
79
|
+
proxy_redirect off;
|
|
80
|
+
include /etc/nginx/proxy_headers.conf;
|
|
81
|
+
}
|
|
82
|
+
location @odoo {
|
|
83
|
+
proxy_pass http://odoo;
|
|
84
|
+
proxy_redirect off;
|
|
85
|
+
include /etc/nginx/proxy_headers.conf;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
location ~ ^/[^/]+/static/.+$ {
|
|
89
|
+
root /odoo;
|
|
90
|
+
# We could figure out a way to automagically adapt this try_files to also include thirdparty addons
|
|
91
|
+
try_files /godoo_workspace/addons$uri /odoo/addons$uri /odoo/odoo/addons$uri /thirdparty/OE_odoo-enterprise$uri /thirdparty/custom/single_mods$uri $uri @odoo;
|
|
92
|
+
expires 7d;
|
|
93
|
+
access_log off;
|
|
94
|
+
include /etc/nginx/mime.types;
|
|
95
|
+
add_header Content-Security-Policy $content_type_csp;
|
|
96
|
+
add_header Cache-Control "public";
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
location /web/filestore {
|
|
100
|
+
internal;
|
|
101
|
+
alias /var/lib/odoo/filestore;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# Cache web assets (JS/CSS bundles) - Odoo uses cache-busting URLs
|
|
105
|
+
location ~* /web/assets/ {
|
|
106
|
+
proxy_pass http://odoo;
|
|
107
|
+
proxy_redirect off;
|
|
108
|
+
include /etc/nginx/proxy_headers.conf;
|
|
109
|
+
expires 7d;
|
|
110
|
+
access_log off;
|
|
111
|
+
add_header Cache-Control "public";
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# PostgreSQL 17 - Odoo 16 Staging
|
|
2
|
+
# 4-core HyperV VM, 23GB RAM shared with prod+plausible
|
|
3
|
+
# Staging is rarely used - minimal resource allocation
|
|
4
|
+
|
|
5
|
+
# CONNECTION
|
|
6
|
+
# Few concurrent users expected
|
|
7
|
+
max_connections = 40
|
|
8
|
+
superuser_reserved_connections = 2
|
|
9
|
+
max_files_per_process = 100
|
|
10
|
+
|
|
11
|
+
# MEMORY (Minimal: ~500MB allocation)
|
|
12
|
+
# Staging should be lean - just enough to function
|
|
13
|
+
shared_buffers = 256MB
|
|
14
|
+
effective_cache_size = 512MB
|
|
15
|
+
maintenance_work_mem = 64MB
|
|
16
|
+
work_mem = 8MB
|
|
17
|
+
hash_mem_multiplier = 2.0
|
|
18
|
+
|
|
19
|
+
# WAL & CHECKPOINT
|
|
20
|
+
wal_buffers = 8MB
|
|
21
|
+
min_wal_size = 256MB
|
|
22
|
+
max_wal_size = 1GB
|
|
23
|
+
checkpoint_timeout = 15min
|
|
24
|
+
checkpoint_completion_target = 0.9
|
|
25
|
+
|
|
26
|
+
# PARALLELISM (Minimal - don't compete with prod)
|
|
27
|
+
max_worker_processes = 2
|
|
28
|
+
max_parallel_workers_per_gather = 0
|
|
29
|
+
max_parallel_workers = 1
|
|
30
|
+
max_parallel_maintenance_workers = 1
|
|
31
|
+
|
|
32
|
+
# I/O (NVMe)
|
|
33
|
+
random_page_cost = 1.1
|
|
34
|
+
effective_io_concurrency = 50
|
|
35
|
+
maintenance_io_concurrency = 25
|
|
36
|
+
|
|
37
|
+
# PLANNER
|
|
38
|
+
default_statistics_target = 50
|
|
39
|
+
jit = off
|
|
40
|
+
|
|
41
|
+
# BGWRITER
|
|
42
|
+
bgwriter_delay = 500ms
|
|
43
|
+
bgwriter_lru_maxpages = 50
|
|
44
|
+
bgwriter_lru_multiplier = 2.0
|
|
45
|
+
|
|
46
|
+
# AUTOVACUUM (Less aggressive for staging)
|
|
47
|
+
autovacuum = on
|
|
48
|
+
autovacuum_max_workers = 1
|
|
49
|
+
autovacuum_naptime = 60s
|
|
50
|
+
autovacuum_vacuum_scale_factor = 0.1
|
|
51
|
+
autovacuum_analyze_scale_factor = 0.05
|
|
52
|
+
autovacuum_vacuum_cost_delay = 10ms
|
|
53
|
+
autovacuum_vacuum_cost_limit = 200
|
|
54
|
+
|
|
55
|
+
# TRANSACTION
|
|
56
|
+
max_prepared_transactions = 0
|
|
57
|
+
|
|
58
|
+
# LOGGING
|
|
59
|
+
log_line_prefix = '%m [%p-%l] %u@%d app=%a '
|
|
60
|
+
log_lock_waits = on
|
|
61
|
+
log_temp_files = 0
|
|
62
|
+
log_autovacuum_min_duration = 0
|
|
63
|
+
# More verbose for debugging staging issues
|
|
64
|
+
log_min_duration_statement = 1000
|
|
65
|
+
track_io_timing = on
|
|
66
|
+
|
|
67
|
+
# PERFORMANCE
|
|
68
|
+
shared_preload_libraries = 'pg_stat_statements'
|
|
69
|
+
pg_stat_statements.track = all
|
|
70
|
+
pg_stat_statements.max = 1000
|
|
71
|
+
|
|
72
|
+
# ODOO TUNING
|
|
73
|
+
statement_timeout = 0
|
|
74
|
+
lock_timeout = 30000
|
|
75
|
+
idle_in_transaction_session_timeout = 600000
|
|
@@ -51,10 +51,11 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
|
51
51
|
# Remove whats between the ----- and replace with: RUN pip install godoo
|
|
52
52
|
# Install only dependencies, so they only reinstall when lock or toml where changed
|
|
53
53
|
COPY pyproject.toml uv.lock README.md ./
|
|
54
|
-
|
|
54
|
+
COPY ./src/godoo_cli/__about__.py ./src/godoo_cli/__about__.py
|
|
55
|
+
RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 uv sync --no-install-project --compile-bytecode --frozen
|
|
55
56
|
|
|
56
57
|
COPY --chown=$USERNAME:$USERNAME ./src ./src
|
|
57
|
-
RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 uv sync --all-extras --compile-bytecode
|
|
58
|
+
RUN --mount=type=cache,target=$UV_CACHE_DIR,uid=1000,gid=1000 uv sync --all-extras --compile-bytecode --frozen
|
|
58
59
|
# In the Devcontainer stage we remove everything in $WORKSPACE and replace it with a Bind-Mount
|
|
59
60
|
# ------------------------------------------------------------------------------------------------------
|
|
60
61
|
# Godoo Pypi Install via pip
|
|
@@ -116,6 +117,7 @@ COPY --from=oodo_addon_source $ODOO_THIRDPARTY_LOCATION $ODOO_THIRDPARTY_LOCATIO
|
|
|
116
117
|
COPY --from=odoo_requirements $VIRTUAL_ENV $VIRTUAL_ENV
|
|
117
118
|
|
|
118
119
|
COPY ../config/nginx.conf /etc/nginx/nginx.conf
|
|
120
|
+
COPY ../config/nginx-proxy_headers.conf /etc/nginx/proxy_headers.conf
|
|
119
121
|
COPY ../config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
120
122
|
COPY ../scripts/launchodoo.sh launchodoo.sh
|
|
121
123
|
COPY ../scripts/migrations migrations
|
|
@@ -11,10 +11,16 @@
|
|
|
11
11
|
odoo:
|
|
12
12
|
# The Odoo section describes where to Clone the odoo source code form. (the one with odoo-bin)
|
|
13
13
|
url: https://github.com/odoo/odoo/
|
|
14
|
-
branch:
|
|
14
|
+
branch: 19.0 # Branch is mandatory on Odoo Repo but not on OCA Repos
|
|
15
15
|
thirdparty:
|
|
16
16
|
# In the thirdparty section we can add more Repos to download.
|
|
17
17
|
# This can also be an ssh style Url for Odoo Enterprise for example.
|
|
18
18
|
OCA: # This repo folder will be called "OCA_server-tools" when downloading.
|
|
19
|
-
- url:
|
|
20
|
-
|
|
19
|
+
- url:
|
|
20
|
+
https://github.com/OCA/server-tools
|
|
21
|
+
# branch: 19.0 # Branch is optional here. If not specified, the default branch of the Repo will be used.
|
|
22
|
+
# commit: abcdef1234567890abcdef1234567890abcdef12 # Commit is also optional. If not specified, the branch will be used and pulled on every `godoo source get`.
|
|
23
|
+
- url: https://github.com/OCA/product-attribute.git
|
|
24
|
+
# merge_from: # We can also Create local merge commits on top of the downloaded Repo.
|
|
25
|
+
# - url: https://github.com/fd-oerp/product-attribute.git
|
|
26
|
+
# branch: 19.0-mig-product_sequence
|
|
@@ -41,6 +41,7 @@ def query_database(
|
|
|
41
41
|
db_host: Annotated[str, CLI.database.db_host] = "",
|
|
42
42
|
db_port: Annotated[int, CLI.database.db_port] = 0,
|
|
43
43
|
db_password: Annotated[str, CLI.database.db_password] = "",
|
|
44
|
+
readonly: Annotated[bool, typer.Option(help="Run query in readonly mode", show_default=True)] = True,
|
|
44
45
|
):
|
|
45
46
|
"""Run a Query against the database.
|
|
46
47
|
|
|
@@ -60,6 +61,7 @@ def query_database(
|
|
|
60
61
|
username=db_user,
|
|
61
62
|
password=db_password,
|
|
62
63
|
db_name=db_name,
|
|
64
|
+
readonly=readonly,
|
|
63
65
|
)
|
|
64
66
|
with connection.connect() as cursor:
|
|
65
67
|
try:
|
|
@@ -114,6 +116,7 @@ def is_bootstrapped(
|
|
|
114
116
|
username=db_user,
|
|
115
117
|
password=db_password,
|
|
116
118
|
db_name=db_name,
|
|
119
|
+
readonly=True,
|
|
117
120
|
)
|
|
118
121
|
bootstrap_value = _is_bootstrapped(db_connection=connection)
|
|
119
122
|
LOGGER.info("Odoo Database Status: %s", bootstrap_value.value)
|
|
@@ -162,6 +165,7 @@ def get_installed_modules(
|
|
|
162
165
|
username=db_user,
|
|
163
166
|
password=db_password,
|
|
164
167
|
db_name=db_name,
|
|
168
|
+
readonly=True,
|
|
165
169
|
)
|
|
166
170
|
installed_modules = _get_installed_modules(db_connection=db_connection, to_install=to_install)
|
|
167
171
|
if isinstance(installed_modules, int):
|
|
@@ -14,7 +14,7 @@ from typing import Annotated, Optional, Union
|
|
|
14
14
|
import typer
|
|
15
15
|
|
|
16
16
|
from ...cli_common import CommonCLI
|
|
17
|
-
from ...helpers.modules_py import
|
|
17
|
+
from ...helpers.modules_py import install_base_python_reqs, install_py_reqs_by_odoo_cmd
|
|
18
18
|
from ...helpers.system import run_cmd
|
|
19
19
|
from ...models import GodooConfig
|
|
20
20
|
from ..db.query import DbBootstrapStatus, _is_bootstrapped
|
|
@@ -188,7 +188,8 @@ def bootstrap_odoo(
|
|
|
188
188
|
cmd_string = re.sub(r"--init base,web", "", cmd_string)
|
|
189
189
|
|
|
190
190
|
# Always update Pip reqs regardless of --no-update-source
|
|
191
|
-
|
|
191
|
+
install_base_python_reqs(odoo_install_folder=odoo_main_path)
|
|
192
|
+
install_py_reqs_by_odoo_cmd(addon_paths=addon_paths, odoo_bin_cmd=cmd_string)
|
|
192
193
|
|
|
193
194
|
LOGGER.info("Launching Bootstrap Commandline")
|
|
194
195
|
ret = run_cmd(cmd_string).returncode
|
|
@@ -7,6 +7,7 @@ from pathlib import Path
|
|
|
7
7
|
from typing import Any, Optional
|
|
8
8
|
|
|
9
9
|
from ...models import GodooConfig, GodooModules
|
|
10
|
+
from ..db.query import DbBootstrapStatus, _is_bootstrapped
|
|
10
11
|
|
|
11
12
|
LOGGER = logging.getLogger(__name__)
|
|
12
13
|
|
|
@@ -99,15 +100,23 @@ def _boostrap_command(
|
|
|
99
100
|
init_modules = []
|
|
100
101
|
|
|
101
102
|
extra_cmd_args_str = " ".join(extra_cmd_args or [])
|
|
102
|
-
if not re.search(r"(-i|--init) ", extra_cmd_args_str):
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
if install_workspace_modules and not re.search(r"(-i|--init|-u|--update) ", extra_cmd_args_str):
|
|
104
|
+
LOGGER.debug("Auto-detecting workspace modules for Bootstrapping")
|
|
105
|
+
workspace_modules = GodooModules([godoo_config.workspace_addon_path])
|
|
106
|
+
if workspace_addons := workspace_modules.get_modules():
|
|
107
|
+
init_modules = [
|
|
108
|
+
f.name for f in workspace_addons if f.version.split(".")[0] == godoo_config.odoo_version.major
|
|
109
|
+
]
|
|
109
110
|
init_modules = init_modules or ["base", "web"]
|
|
110
|
-
|
|
111
|
+
|
|
112
|
+
# if we are in a situation, where we call godoo bootstrap on a database that already has data,
|
|
113
|
+
# we should not pass --init but --update
|
|
114
|
+
init_cmd = ""
|
|
115
|
+
if init_modules:
|
|
116
|
+
if _is_bootstrapped(godoo_config.db_connection) == DbBootstrapStatus.BOOTSTRAPPED:
|
|
117
|
+
init_cmd = "--update " + ",".join(init_modules)
|
|
118
|
+
else:
|
|
119
|
+
init_cmd = "--init " + ",".join(init_modules)
|
|
111
120
|
|
|
112
121
|
addon_paths_str_list = [str(p.absolute()) for p in addon_paths if p and p.exists()]
|
|
113
122
|
addon_paths_str = ", ".join(addon_paths_str_list)
|
{godoo_cli-0.15.0 → godoo_cli-0.16.0}/src/godoo_cli/commands/odoo_bin/godoo_test/test_run.py
RENAMED
|
@@ -131,7 +131,8 @@ def odoo_run_tests( # noqa: C901
|
|
|
131
131
|
module_list = ",".join(module_names)
|
|
132
132
|
|
|
133
133
|
LOGGER.info("Testing Odoo Modules:\n%s", sorted(module_names))
|
|
134
|
-
if "account" in [p.name for p in depends]:
|
|
134
|
+
if "account" in [p.name for p in depends] and godoo_conf.odoo_version.major <= 16:
|
|
135
|
+
# l10n_generic_coa got removed in Odoo 16
|
|
135
136
|
bootstrap_args = [f"--init {module_list},l10n_generic_coa"]
|
|
136
137
|
else:
|
|
137
138
|
bootstrap_args = [f"--init {module_list}"]
|
|
@@ -20,6 +20,8 @@ from ...models import GodooConfig
|
|
|
20
20
|
CLI = CommonCLI()
|
|
21
21
|
LOGGER = logging.getLogger(__name__)
|
|
22
22
|
|
|
23
|
+
SHELL_SCRIPTS_PATH = Path(__file__).parent / "shell_scripts"
|
|
24
|
+
|
|
23
25
|
|
|
24
26
|
def odoo_shell_uninstall_modules(
|
|
25
27
|
module_list: Annotated[list[str], typer.Argument(help="List of Modules to uninstall")],
|
|
@@ -89,8 +91,7 @@ def complete_script_name():
|
|
|
89
91
|
Returns:
|
|
90
92
|
List[str]: List of script names without their .py extension.
|
|
91
93
|
"""
|
|
92
|
-
|
|
93
|
-
return [p.stem for p in script_folder.glob("*.py")]
|
|
94
|
+
return [p.stem for p in SHELL_SCRIPTS_PATH.glob("*.py")]
|
|
94
95
|
|
|
95
96
|
|
|
96
97
|
def odoo_shell_run_script(
|
|
@@ -114,10 +115,9 @@ def odoo_shell_run_script(
|
|
|
114
115
|
Returns:
|
|
115
116
|
int: 0 for success, non-zero for failure.
|
|
116
117
|
"""
|
|
117
|
-
|
|
118
|
-
script_path = script_folder / f"{script_name}.py"
|
|
118
|
+
script_path = SHELL_SCRIPTS_PATH / f"{script_name}.py"
|
|
119
119
|
if not script_path.exists():
|
|
120
|
-
LOGGER.error("Script '%s' not found in %s", script_name,
|
|
120
|
+
LOGGER.error("Script '%s' not found in %s", script_name, SHELL_SCRIPTS_PATH)
|
|
121
121
|
return CLI.returner(1)
|
|
122
122
|
|
|
123
123
|
shell_cmd = f"{odoo_main_path.absolute()!s}/odoo-bin shell --no-http"
|
|
@@ -9,14 +9,14 @@ from pathlib import Path
|
|
|
9
9
|
from typing import Annotated, Optional
|
|
10
10
|
|
|
11
11
|
import typer
|
|
12
|
-
from ruamel.yaml import YAML
|
|
13
12
|
|
|
14
13
|
from ..cli_common import CommonCLI
|
|
15
|
-
from ..git import
|
|
16
|
-
from ..
|
|
17
|
-
from ..helpers.
|
|
18
|
-
from ..helpers.
|
|
19
|
-
from ..
|
|
14
|
+
from ..git.git_odoo_addons import git_ensure_repo_matches_manifest, git_ensure_thirdparty_repos
|
|
15
|
+
from ..git.git_url import GitUrl
|
|
16
|
+
from ..helpers.modules_py import install_base_python_reqs, install_py_reqs_for_modules
|
|
17
|
+
from ..helpers.pip import pip_command
|
|
18
|
+
from ..helpers.system import download_file, run_cmd
|
|
19
|
+
from ..models import DBConnection, GodooConfig, GodooManifest, GodooModules
|
|
20
20
|
from .db.query import _get_installed_modules
|
|
21
21
|
|
|
22
22
|
LOGGER = logging.getLogger(__name__)
|
|
@@ -145,7 +145,7 @@ def py_depends_by_db(
|
|
|
145
145
|
module_list = list(module_list)
|
|
146
146
|
module_reg = GodooModules(godoo_config.addon_paths)
|
|
147
147
|
modules = list(module_reg.get_modules(module_list, raise_missing_names=False))
|
|
148
|
-
|
|
148
|
+
install_py_reqs_for_modules(modules, module_reg)
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
def get_installed_module_paths(
|
|
@@ -182,7 +182,9 @@ def get_installed_module_paths(
|
|
|
182
182
|
def py_depends_by_modules(
|
|
183
183
|
module_list: Annotated[
|
|
184
184
|
list[str],
|
|
185
|
-
typer.Argument(
|
|
185
|
+
typer.Argument(
|
|
186
|
+
help="Modules to check for dependencies (can use 'all' for all available addons, 'base' for just Odoo Base requirements.txt)"
|
|
187
|
+
),
|
|
186
188
|
],
|
|
187
189
|
thirdparty_addon_path: Annotated[Path, CLI.odoo_paths.thirdparty_addon_path],
|
|
188
190
|
odoo_main_path: Annotated[Path, CLI.odoo_paths.bin_path],
|
|
@@ -194,11 +196,15 @@ def py_depends_by_modules(
|
|
|
194
196
|
workspace_addon_path=workspace_addon_path,
|
|
195
197
|
thirdparty_addon_path=thirdparty_addon_path,
|
|
196
198
|
)
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
|
|
200
|
+
if len(module_list) == 1:
|
|
201
|
+
if module_list[0] == "all":
|
|
202
|
+
module_list = []
|
|
203
|
+
elif module_list[0] == "base":
|
|
204
|
+
return install_base_python_reqs(odoo_install_folder=odoo_main_path)
|
|
199
205
|
module_reg = GodooModules(godoo_config.addon_paths)
|
|
200
206
|
modules = list(module_reg.get_modules(module_list))
|
|
201
|
-
|
|
207
|
+
install_py_reqs_for_modules(modules, module_reg)
|
|
202
208
|
|
|
203
209
|
|
|
204
210
|
def get_source_file(
|
|
@@ -214,10 +220,9 @@ def get_source_file(
|
|
|
214
220
|
LOGGER.error(msg)
|
|
215
221
|
raise ValueError(msg)
|
|
216
222
|
if manifest_path and not repo_url:
|
|
217
|
-
manifest =
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
file_ref = odoo_spec.get("commit") or odoo_spec.get("branch")
|
|
223
|
+
manifest = GodooManifest.from_yaml_file(manifest_path)
|
|
224
|
+
repo_url = manifest.odoo.url
|
|
225
|
+
file_ref = manifest.odoo.ref
|
|
221
226
|
if not file_ref:
|
|
222
227
|
msg = "Need to provide file ref. If you provided a manifest, make sure there is a branch or commit key in the odoo section"
|
|
223
228
|
LOGGER.error(msg)
|
|
@@ -266,36 +271,59 @@ def get_source(
|
|
|
266
271
|
workspace_addon_path=workspace_addon_path,
|
|
267
272
|
thirdparty_addon_path=thirdparty_addon_path,
|
|
268
273
|
)
|
|
274
|
+
update_zip = update_mode in ["all", "zip"]
|
|
275
|
+
update_odoo = update_mode in ["all", "odoo"]
|
|
276
|
+
update_thirdparty = update_mode in ["all", "thirdparty"]
|
|
277
|
+
|
|
278
|
+
if not manifest_path:
|
|
279
|
+
msg = "Manifest path is required when updating Odoo or third-party sources."
|
|
280
|
+
LOGGER.error(msg)
|
|
281
|
+
raise ValueError(msg)
|
|
282
|
+
manifest = GodooManifest.from_yaml_file(manifest_path)
|
|
269
283
|
|
|
270
|
-
if
|
|
284
|
+
if update_zip:
|
|
271
285
|
unpack_addon_archives(
|
|
272
286
|
thirdparty_zip_source, godoo_config.zip_addon_path, remove_excess=remove_unspecified_addons
|
|
273
287
|
)
|
|
274
288
|
|
|
275
|
-
if
|
|
276
|
-
|
|
289
|
+
if update_odoo:
|
|
290
|
+
repo_spec = manifest.odoo if manifest else None
|
|
291
|
+
if not repo_spec:
|
|
292
|
+
msg = "Manifest is required to update Odoo source."
|
|
293
|
+
LOGGER.error(msg)
|
|
294
|
+
raise ValueError(msg)
|
|
295
|
+
git_ensure_repo_matches_manifest(
|
|
277
296
|
target_folder=godoo_config.odoo_install_folder,
|
|
278
|
-
|
|
297
|
+
repo_spec=repo_spec,
|
|
298
|
+
default_branch=manifest.default_branch,
|
|
279
299
|
force_fetch=force_fetch,
|
|
280
|
-
add_compare_comment=add_compare_comments,
|
|
281
300
|
download_archive=download_zipmode,
|
|
282
301
|
pin_commit=pin_commits,
|
|
283
302
|
)
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
303
|
+
odoo_bin = godoo_config.odoo_install_folder / "odoo-bin"
|
|
304
|
+
if odoo_bin.exists():
|
|
305
|
+
LOGGER.debug("chmod odoo-bin +executable")
|
|
306
|
+
odoo_bin.chmod(0o755)
|
|
307
|
+
else:
|
|
308
|
+
LOGGER.warning("Could not find odoo-bin in %s", godoo_config.odoo_install_folder)
|
|
309
|
+
LOGGER.info("Installing Odoo requirements")
|
|
310
|
+
run_cmd(f"{pip_command()} install -r {godoo_config.odoo_install_folder / 'requirements.txt'}")
|
|
311
|
+
|
|
312
|
+
if update_thirdparty:
|
|
313
|
+
git_ensure_thirdparty_repos(
|
|
287
314
|
root_folder=godoo_config.thirdparty_addon_path,
|
|
288
|
-
|
|
315
|
+
manifest=manifest,
|
|
289
316
|
generate_yml_compare_comments=add_compare_comments,
|
|
290
317
|
download_archive=download_zipmode,
|
|
291
318
|
pin_commits=pin_commits,
|
|
292
319
|
)
|
|
293
320
|
if remove_unspecified_addons:
|
|
294
|
-
|
|
321
|
+
manifest.remove_unused_addon_folders(
|
|
295
322
|
thirdparty_addon_path=godoo_config.thirdparty_addon_path,
|
|
296
|
-
thirdparty_repos=git_repos.get("thirdparty", []),
|
|
297
323
|
keep_folders=[godoo_config.zip_addon_path],
|
|
298
324
|
)
|
|
325
|
+
if add_compare_comments:
|
|
326
|
+
manifest.to_yaml_file(add_compare_urls=add_compare_comments)
|
|
299
327
|
|
|
300
328
|
if (conf_path := odoo_conf_path).exists():
|
|
301
329
|
odoo_addon_paths = godoo_config.addon_paths
|
|
@@ -7,7 +7,5 @@ This package provides functionality for managing Odoo and addon source code usin
|
|
|
7
7
|
- Supporting archive downloads for Git repositories
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
from .git_odoo import git_ensure_odoo_repo
|
|
11
|
-
from .git_odoo_addons import git_ensure_addon_repos
|
|
12
10
|
from .git_repo import git_ensure_repo
|
|
13
11
|
from .git_url import GitUrl
|