### Initialize Private Addons using addons CLI Source: https://context7.com/tecnativa/doodba/llms.txt Run `addons init -p` to install all private addons. This command automates the setup of your custom modules. ```bash docker-compose run --rm odoo addons init -p ``` -------------------------------- ### Start Odoo Normally Source: https://context7.com/tecnativa/doodba/llms.txt The default command `docker-compose up odoo` starts the Odoo service. The entrypoint handles database connections and environment setup automatically. ```bash docker-compose up odoo ``` -------------------------------- ### List Installable Extra Addons Source: https://context7.com/tecnativa/doodba/llms.txt Filter the list of extra addons to show only those that are installable using `addons list -e -i`. This excludes addons marked as non-installable. ```bash docker-compose run --rm odoo addons list -e -i ``` -------------------------------- ### Define Ordered Custom Pip Dependencies Source: https://context7.com/tecnativa/doodba/llms.txt Use numbered filenames to ensure specific Python packages are installed in a defined sequence. This format is `[sequence]-[installer]-[description].txt`. ```text # custom/dependencies/100-pip-special.txt # Numbered files for ordered installation # Format: [sequence]-[installer]-[description].txt some-special-package==1.2.3 ``` -------------------------------- ### Define Custom Apt Dependencies Source: https://context7.com/tecnativa/doodba/llms.txt Specify system packages to be installed via apt-get. Doodba processes these files during the build. ```text # custom/dependencies/apt.txt # System packages installed via apt-get libcups2-dev libcairo2-dev libgirepository1.0-dev ``` -------------------------------- ### Define Custom Gem Dependencies Source: https://context7.com/tecnativa/doodba/llms.txt List Ruby gems to be installed. Doodba processes these files in order during the build phase. ```text # custom/dependencies/gem.txt # Ruby gems sass compass ``` -------------------------------- ### Reference build-time environment variables Source: https://context7.com/tecnativa/doodba/llms.txt These variables control the build process, including Odoo versioning, repository patterns, and installation settings. ```bash # Build-time variables (ARG in Dockerfile) ODOO_VERSION=19.0 # Odoo version to use AGGREGATE=true # Enable git-aggregator DEFAULT_REPO_PATTERN="https://github.com/OCA/{}.git" # Default repo URL pattern DEFAULT_REPO_PATTERN_ODOO="https://github.com/OCA/OCB.git" # Odoo source DEPTH_DEFAULT=1 # Git clone depth for normal repos DEPTH_MERGE=100 # Git clone depth for repos with merges CLEAN=true # Remove unused code after build COMPILE=true # Compile Python bytecode PIP_INSTALL_ODOO=true # Install Odoo via pip UID=1000 # User ID for odoo user GID=1000 # Group ID for odoo group LOG_LEVEL=INFO # Build log level ``` -------------------------------- ### Define custom entrypoint scripts Source: https://context7.com/tecnativa/doodba/llms.txt Executable scripts placed in entrypoint.d run before Odoo starts. Ensure scripts are executable with chmod +x. ```bash #!/bin/bash # custom/entrypoint.d/60-custom-init # Scripts must be executable: chmod +x custom/entrypoint.d/60-custom-init set -e log INFO "Running custom initialization..." # Example: Wait for external service if [ -n "$REDIS_HOST" ]; then log INFO "Waiting for Redis at $REDIS_HOST..." while ! nc -z "$REDIS_HOST" 6379; do sleep 1 done log INFO "Redis is available" fi # Example: Run database migration if [ "$RUN_MIGRATIONS" = "true" ]; then log INFO "Running click-odoo-update..." click-odoo-update --log-level=info fi log INFO "Custom initialization complete" ``` -------------------------------- ### Define Custom Pip Dependencies Source: https://context7.com/tecnativa/doodba/llms.txt List Python packages required for your project in standard requirements.txt format. These are installed via pip. ```text # custom/dependencies/pip.txt # Python packages installed via pip # Standard requirements.txt format phonenumbers>=8.12.0 python-stdnum>=1.14 PyPDF2>=1.26 boto3>=1.17.0 redis>=3.5.0 ``` -------------------------------- ### Build a Custom Odoo Project Dockerfile Source: https://context7.com/tecnativa/doodba/llms.txt Extends the Doodba base image to automate addon aggregation and dependency installation. ```dockerfile # Dockerfile for your Odoo project FROM tecnativa/doodba:19.0-onbuild # Optional: Set custom build arguments ARG ODOO_VERSION=19.0 ARG UID=1000 ARG GID=1000 # Optional: Add any custom build steps # The ONBUILD instructions will automatically: # 1. Copy ./custom to /opt/odoo/custom # 2. Set up SSH keys from ./custom/ssh # 3. Run /opt/odoo/common/build to aggregate repos and install dependencies # 4. Create the odoo user with specified UID/GID ``` -------------------------------- ### Define Custom Npm Dependencies Source: https://context7.com/tecnativa/doodba/llms.txt Specify Node.js packages to be installed globally using npm. Doodba handles these during the build process. ```text # custom/dependencies/npm.txt # Node.js packages installed globally rtlcss less ``` -------------------------------- ### Generated Repository Aggregator Configuration Source: https://github.com/tecnativa/doodba/blob/master/README.md Example of the generated repos.yaml file used by the git aggregator to download source code. ```yaml /opt/odoo/custom/src/odoo: defaults: depth: $DEPTH_DEFAULT remotes: origin: https://github.com/OCA/OCB.git target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION /opt/odoo/custom/src/server-tools: defaults: depth: $DEPTH_DEFAULT remotes: origin: https://github.com/OCA/server-tools.git target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION ``` -------------------------------- ### Example repos.yaml for Git Repository Management Source: https://github.com/tecnativa/doodba/blob/master/README.md Configuration file for git-aggregator to manage Odoo and web module repositories. It specifies default clone depths, remote origins, target branches, and merge strategies, including handling of specific pull requests and custom branches. ```yaml # Odoo must be in the `odoo` folder for Doodba to work odoo: defaults: # This will use git shallow clones. # $DEPTH_DEFAULT is 1 in test and prod, but 100 in devel. # $DEPTH_MERGE is always 100. # You can use any integer value, OTOH. depth: $DEPTH_MERGE remotes: origin: https://github.com/OCA/OCB.git odoo: https://github.com/odoo/odoo.git openupgrade: https://github.com/OCA/OpenUpgrade.git # $ODOO_VERSION is... the Odoo version! "11.0" or similar target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION - odoo refs/pull/25594/head # Expose `Field` from search_filters.js web: defaults: depth: $DEPTH_MERGE remotes: origin: https://github.com/OCA/web.git tecnativa: https://github.com/Tecnativa/partner-contact.git target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION - origin refs/pull/1007/head # web_responsive search - tecnativa 11.0-some_addon-custom # Branch for this customer only ``` -------------------------------- ### Get Addon Dependencies Source: https://context7.com/tecnativa/doodba/llms.txt Use `addons list -p --dependencies` to retrieve and display the dependency information for your private addons. This is crucial for understanding module relationships. ```bash docker-compose run --rm odoo addons list -p --dependencies ``` -------------------------------- ### Python Debugger Setup with 'debugpy' Source: https://github.com/tecnativa/doodba/blob/master/README.md Integrate the VSCode Python debugger ('debugpy') into your Odoo application. This requires setting up listening on a port and waiting for a client to attach. ```python import debugpy debugpy.listen(6899) print("Waiting for debugger attach") debugpy.wait_for_client() debugpy.breakpoint() print('break on this line') ``` -------------------------------- ### Example repos.yaml for git-aggregator Source: https://github.com/tecnativa/doodba/blob/master/README.md This YAML file configures git-aggregator to merge code from multiple repositories, including specific branches or pull requests. It supports setting default repository depths and executing shell commands after merging. ```yaml ./odoo: defaults: # Shallow repositores are faster & thinner. You better use # $DEPTH_DEFAULT here when you need no merges. depth: $DEPTH_MERGE remotes: ocb: https://github.com/OCA/OCB.git odoo: https://github.com/odoo/odoo.git target: ocb $ODOO_VERSION merges: - ocb $ODOO_VERSION - odoo refs/pull/13635/head shell_command_after: # Useful to merge a diff when there's no git history correlation - curl -sSL https://github.com/odoo/odoo/pull/37187.diff | patch -fp1 ``` -------------------------------- ### Define custom build scripts Source: https://context7.com/tecnativa/doodba/llms.txt Scripts in build.d execute during the Docker build process for tasks like asset compilation or dependency setup. ```bash #!/bin/bash # custom/build.d/350-custom-setup # Scripts must be executable and run during docker build set -e log INFO "Running custom build setup..." # Example: Download GeoIP database if [ -n "$GEOIP_LICENSE_KEY" ]; then log INFO "Updating GeoIP database..." geoipupdate -v fi # Example: Compile custom assets if [ -d "/opt/odoo/custom/src/private/my_addon/static/src/scss" ]; then log INFO "Compiling SCSS..." cd /opt/odoo/custom/src/private/my_addon/static/src/scss sass --update .:. fi log INFO "Custom build setup complete" ``` -------------------------------- ### Enabling Debugpy via Environment Variable Source: https://github.com/tecnativa/doodba/blob/master/README.md To start Odoo in a debugpy-enabled environment, set the DEBUGPY_ENABLE environment variable to 1. This allows breakpoints set in your IDE to be honored. ```bash export DOODBA_DEBUGPY_ENABLE=1 docker-compose -f devel.yaml up -d ``` -------------------------------- ### Run Odoo with Specific Database Source: https://context7.com/tecnativa/doodba/llms.txt Execute Odoo commands against a specific database by setting the `PGDATABASE` environment variable. For example, `PGDATABASE=test_db odoo odoo`. ```bash docker-compose run --rm -e PGDATABASE=test_db odoo odoo ``` -------------------------------- ### Use Custom Separator in Output Source: https://context7.com/tecnativa/doodba/llms.txt Customize the output separator for the `addons list` command using the `-s` flag followed by the desired separator. For example, use a space with `addons list -p -s " "`. ```bash docker-compose run --rm odoo addons list -p -s " " ``` -------------------------------- ### Basic Addon Configuration Source: https://github.com/tecnativa/doodba/blob/master/README.md Simple mapping of repositories to lists of modules to be activated. ```yaml website: - website_cookie_notice - website_legal_page web: - web_responsive ``` -------------------------------- ### Advanced Addon Configuration with Environment Controls Source: https://github.com/tecnativa/doodba/blob/master/README.md Demonstrates advanced features including multiple YAML documents, environment-specific activation, and custom repository environment variables. ```yaml # Spanish Localization l10n-spain: - l10n_es # Overrides built-in l10n_es under odoo/addons server-tools: - "*date*" # All modules that contain "date" in their name - auditlog web: - "*" # All web addons --- # Different YAML document to separate SEO Tools website: - website_blog_excertp_img server-tools: # Here we repeat server-tools, but no problem because it's a # different document - html_image_url_extractor - html_text --- # Enable demo ribbon only for devel and test environments ONLY: PGDATABASE: # This environment variable must exist and be in the list - devel - test web: - web_environment_ribbon --- # Enable special authentication methods only in production environment ONLY: PGDATABASE: - prod server-tools: - auth_* --- # Custom repositories ENV: DEFAULT_REPO_PATTERN: https://github.com/Tecnativa/{}.git ODOO_VERSION: 16.0-new-feature some-repo: # Cloned from https://github.com/Tecnativa/some-repo.git branch 15.0-new-feature - some_custom_module ``` -------------------------------- ### List Private Addons using addons CLI Source: https://context7.com/tecnativa/doodba/llms.txt Use the `addons list -p` command to display all private addons configured for your project. This helps in managing custom modules. ```bash docker-compose run --rm odoo addons list -p ``` -------------------------------- ### Initialize Database with Specific Modules Source: https://context7.com/tecnativa/doodba/llms.txt Initialize the database with a specific set of modules using `odoo --init , --stop-after-init`. This command is useful for setting up a new database. ```bash docker-compose run --rm odoo odoo --init base,sale,purchase --stop-after-init ``` -------------------------------- ### Logging with the 'log' Script Source: https://github.com/tecnativa/doodba/blob/master/README.md Use the 'log' shell script to add informational messages to your build or entrypoint scripts. Specify the log level (e.g., INFO) followed by the message. ```bash log INFO I'm informing ``` -------------------------------- ### Run Database Preparation Script Source: https://context7.com/tecnativa/doodba/llms.txt Execute the `preparedb` command to run database preparation scripts. This is often used after major upgrades or schema changes. ```bash docker-compose run --rm odoo preparedb ``` -------------------------------- ### List Private Addons with Full Paths Source: https://context7.com/tecnativa/doodba/llms.txt Use the `addons list -p --fullpath` command to see the complete file system paths for all private addons. This is helpful for debugging or direct file access. ```bash docker-compose run --rm odoo addons list -p --fullpath ``` -------------------------------- ### Define Addon Activation Source: https://github.com/tecnativa/doodba/blob/master/README.md Specify which modules to activate from repositories in the addons.yaml file. ```yaml server-tools: - module_auto_update ``` -------------------------------- ### VSCode Launch Configuration for Debugging Source: https://context7.com/tecnativa/doodba/llms.txt Configure your `.vscode/launch.json` file with the 'Attach to Doodba' settings. Specify `localRoot`, `remoteRoot`, `port`, and `host` for the debugger to connect correctly. ```json { "version": "0.2.0", "configurations": [ { "name": "Attach to Doodba", "type": "python", "request": "attach", "pathMappings": [ { "localRoot": "${workspaceRoot}/odoo", "remoteRoot": "/opt/odoo" } ], "port": 6899, "host": "localhost" } ] } ``` -------------------------------- ### List Extra Addons using addons CLI Source: https://context7.com/tecnativa/doodba/llms.txt To view all extra addons (non-core, non-private), use the `addons list -e` command. This is useful for identifying available community or third-party modules. ```bash docker-compose run --rm odoo addons list -e ``` -------------------------------- ### Basic Dockerfile for Project Subimage Source: https://github.com/tecnativa/doodba/blob/master/README.md This is a minimal Dockerfile to build your project's subimage from the Doodba base image. Ensure your project has a './custom' folder for this to work correctly. ```dockerfile FROM tecnativa/doodba MAINTAINER Me ``` -------------------------------- ### List Core Odoo Addons using addons CLI Source: https://context7.com/tecnativa/doodba/llms.txt Display all core Odoo addons by running `addons list -c`. This command helps in understanding the base modules included with Odoo. ```bash docker-compose run --rm odoo addons list -c ``` -------------------------------- ### Configure addons.yaml for Addon Selection Source: https://context7.com/tecnativa/doodba/llms.txt Specifies which addons to include from repositories, supporting glob patterns and environment-based filtering. ```yaml # custom/src/addons.yaml # Web UI enhancements web: - web_responsive - web_environment_ribbon - web_notify # Server utilities server-tools: - auditlog - base_technical_user - module_auto_update - "*date*" # All modules containing "date" in name # Partner management partner-contact: - partner_firstname - partner_second_lastname # Spanish localization l10n-spain: - l10n_es - l10n_es_aeat --- # Development-only addons (separate YAML document) ONLY: PGDATABASE: - devel - test web: - web_environment_ribbon --- ``` -------------------------------- ### Exporting Translation Templates with 'pot' Source: https://github.com/tecnativa/doodba/blob/master/README.md The 'pot' command is a shortcut for exporting translation templates from one or more addons. Provide a comma-separated list of addon names. ```bash pot my_addon,my_other_addon ``` -------------------------------- ### Export Translation Template Source: https://context7.com/tecnativa/doodba/llms.txt Generate a translation template file (`.pot`) for a specific addon using `pot `. This is essential for internationalization. ```bash docker-compose run --rm odoo pot my_addon ``` -------------------------------- ### Configure GeoIP database Source: https://context7.com/tecnativa/doodba/llms.txt Set up MaxMind GeoIP integration via Docker environment variables and Odoo configuration files. ```yaml # docker-compose.yaml services: odoo: build: args: GEOIP_UPDATER_VERSION: "6.0.0" environment: GEOIP_ACCOUNT_ID: "your_account_id" GEOIP_LICENSE_KEY: "your_license_key" ``` ```ini # custom/conf.d/60-geoip.conf (for Odoo 17+) [options] geoip_city_db = /opt/odoo/auto/geoip/GeoLite2-City.mmdb geoip_country_db = /opt/odoo/auto/geoip/GeoLite2-Country.mmdb ``` -------------------------------- ### Connecting to PostgreSQL with 'psql' Source: https://github.com/tecnativa/doodba/blob/master/README.md Connect to the Odoo database using the 'psql' client by running it within the Odoo container. Environment variables are pre-configured for easy connection. ```bash docker-compose run -l traefik.enable=false --rm odoo psql ``` -------------------------------- ### VSCode Launch Configuration for Doodba Debugging Source: https://github.com/tecnativa/doodba/blob/master/README.md Configure your VSCode 'launch.json' file to attach to a Python process running inside the Doodba container. Ensure the 'localRoot' and 'remoteRoot' paths are correctly mapped. ```json { "version": "0.2.0", "configurations": [ { "name": "Attach to debug in devel.yaml", "type": "python", "request": "attach", "pathMappings": [ { "localRoot": "${workspaceRoot}/odoo", "remoteRoot": "/opt/odoo" } ], "port": 6899, "host": "localhost" } ] } ``` -------------------------------- ### Monitor PostgreSQL with pg_activity Source: https://context7.com/tecnativa/doodba/llms.txt Run `pg_activity` within the container to monitor active PostgreSQL processes and database performance. This is useful for identifying bottlenecks. ```bash docker-compose run --rm odoo pg_activity ``` -------------------------------- ### Access PostgreSQL Directly Source: https://context7.com/tecnativa/doodba/llms.txt Connect to the PostgreSQL database directly using the `psql` command within the container. This allows for direct SQL queries and administration. ```bash docker-compose run --rm odoo psql ``` -------------------------------- ### Update Extra Addons with Tests Source: https://context7.com/tecnativa/doodba/llms.txt Execute `addons update -e --test` to update all extra addons and run their associated tests. This ensures the integrity of non-core modules. ```bash docker-compose run --rm odoo addons update -e --test ``` -------------------------------- ### Configure Odoo via custom conf.d Source: https://context7.com/tecnativa/doodba/llms.txt Use this configuration file to override Odoo settings, logging, and performance parameters at runtime. ```ini [options] ; Custom Odoo configuration ; Environment variables are expanded at runtime workers = 4 max_cron_threads = 1 limit_memory_hard = 2684354560 limit_memory_soft = 2147483648 limit_time_cpu = 600 limit_time_real = 1200 ; Custom addon path (auto-generated, but can override) ; addons_path = /opt/odoo/auto/addons ; Logging configuration log_level = info log_handler = :INFO,werkzeug:WARNING,odoo.addons.base.models.ir_cron:WARNING ; Performance settings db_maxconn = 64 ``` -------------------------------- ### Configure Docker Compose Build Arguments Source: https://github.com/tecnativa/doodba/blob/master/README.md Define default repository patterns for Odoo modules within the docker-compose service configuration. ```yaml services: odoo: build: args: DEFAULT_REPO_PATTERN: &origin "https://github.com/Tecnativa/{}.git" DEFAULT_REPO_PATTERN_ODOO: *origin ``` -------------------------------- ### Configure repos.yaml for Git Aggregation Source: https://context7.com/tecnativa/doodba/llms.txt Controls repository sources and merge strategies for Odoo and third-party addons. ```yaml # custom/src/repos.yaml # Odoo source - using OCA's OCB (Odoo Community Backports) odoo: defaults: depth: $DEPTH_MERGE remotes: origin: https://github.com/OCA/OCB.git odoo: https://github.com/odoo/odoo.git target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION # Merge specific PRs if needed - odoo refs/pull/25594/head # OCA Web addons web: defaults: depth: $DEPTH_MERGE remotes: origin: https://github.com/OCA/web.git target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION - origin refs/pull/1007/head # Specific PR merge # OCA Server Tools server-tools: defaults: depth: $DEPTH_DEFAULT remotes: origin: https://github.com/OCA/server-tools.git target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION # Custom fork with modifications partner-contact: defaults: depth: $DEPTH_MERGE remotes: origin: https://github.com/OCA/partner-contact.git custom: https://github.com/mycompany/partner-contact.git target: origin $ODOO_VERSION merges: - origin $ODOO_VERSION - custom 19.0-custom-feature ``` -------------------------------- ### Add Breakpoint with debugpy Source: https://context7.com/tecnativa/doodba/llms.txt Insert `import debugpy`, `debugpy.listen()`, `debugpy.wait_for_client()`, and `debugpy.breakpoint()` into your Python code to enable remote debugging. Ensure the port matches the `docker-compose.devel.yaml` configuration. ```python import debugpy debugpy.listen(6899) print("Waiting for debugger attach") debugpy.wait_for_client() debugpy.breakpoint() print('break on this line') ``` -------------------------------- ### Update Specific Addons using addons CLI Source: https://context7.com/tecnativa/doodba/llms.txt To update specific addons, use the `addons update --with ` command. Replace `` with the actual addon name. ```bash docker-compose run --rm odoo addons update --with my_module --with other_module ``` -------------------------------- ### Configure Debugpy for VSCode Source: https://context7.com/tecnativa/doodba/llms.txt Set `DEBUGPY_ENABLE` and `DEBUGPY_ARGS` environment variables in `docker-compose.devel.yaml` to enable remote debugging. Map the debugger port using the `ports` directive. ```yaml version: "3.8" services: odoo: environment: DEBUGPY_ENABLE: "1" DEBUGPY_ARGS: "--listen 0.0.0.0:6899 --wait-for-client" ports: - "6899:6899" # Debugger port ``` -------------------------------- ### Pinning Docker Image Version with SHA256 Source: https://github.com/tecnativa/doodba/blob/master/README.md This Dockerfile demonstrates how to pin a specific version of the tecnativa/doodba image using its SHA256 digest for reproducible builds. Ensure you replace the placeholder digest with the actual one for your desired version. ```dockerfile # Hash-pinned version of tecnativa/doodba:10.0-onbuild FROM tecnativa/doodba@sha256:fba69478f9b0616561aa3aba4d18e4bcc2f728c9568057946c98d5d3817699e1 ``` -------------------------------- ### Configure Docker Compose for Odoo Source: https://context7.com/tecnativa/doodba/llms.txt Defines the Odoo service and PostgreSQL database environment for development or production. ```yaml # docker-compose.yaml version: "3.8" services: odoo: build: context: . args: ODOO_VERSION: "19.0" UID: 1000 GID: 1000 AGGREGATE: "true" DEFAULT_REPO_PATTERN: "https://github.com/OCA/{}.git" environment: # Database configuration PGUSER: odoo PGPASSWORD: odoopassword PGHOST: db PGPORT: 5432 PGDATABASE: prod DB_FILTER: ".*" LIST_DB: "false" # SMTP configuration SMTP_SERVER: smtp SMTP_PORT: 25 EMAIL_FROM: "odoo@example.com" # Odoo settings ADMIN_PASSWORD: admin PROXY_MODE: "true" WITHOUT_DEMO: "all" WAIT_DB: "true" # Debugging (development only) DEBUGPY_ENABLE: "0" ports: - "8069:8069" - "8072:8072" volumes: - odoo-data:/var/lib/odoo depends_on: - db db: image: postgres:16 environment: POSTGRES_USER: odoo POSTGRES_PASSWORD: odoopassword POSTGRES_DB: prod volumes: - db-data:/var/lib/postgresql/data volumes: odoo-data: db-data: ``` -------------------------------- ### Connect to pudb Debugger via Telnet Source: https://context7.com/tecnativa/doodba/llms.txt Use `docker-compose exec odoo telnet localhost 6899` to establish a telnet connection to the `pudb` remote debugger. Ensure the port matches the `set_trace` configuration. ```bash docker-compose exec odoo telnet localhost 6899 ``` -------------------------------- ### Exclude Specific Addons from List Source: https://context7.com/tecnativa/doodba/llms.txt Employ `addons list -e --without ` to exclude certain addons from the output. This is useful when you want to focus on a subset of extra addons. ```bash docker-compose run --rm odoo addons list -e --without addon_to_skip ``` -------------------------------- ### Run Odoo Shell Source: https://context7.com/tecnativa/doodba/llms.txt Access the Odoo interactive shell by running `docker-compose run --rm odoo odoo shell`. This provides a Python environment within the Odoo container. ```bash docker-compose run --rm odoo odoo shell ``` -------------------------------- ### Manage Odoo with click-odoo Source: https://context7.com/tecnativa/doodba/llms.txt Use click-odoo-contrib commands to perform database operations and execute scripts within the Odoo environment. ```bash # Initialize a new database with demo data docker-compose run --rm odoo click-odoo-initdb -n new_database # Update database (smart module update) docker-compose run --rm odoo click-odoo-update --log-level=info # Copy database docker-compose run --rm odoo click-odoo-copydb source_db target_db # Drop database docker-compose run --rm odoo click-odoo-dropdb old_database # Run Python script with Odoo environment docker-compose run --rm odoo click-odoo -c /opt/odoo/auto/odoo.conf <<'EOF' env['res.partner'].search([]).write({'active': True}) env.cr.commit() EOF # Makepot - generate translation template docker-compose run --rm odoo click-odoo-makepot -m my_module -o /tmp/my_module.pot ``` -------------------------------- ### SSH Config for Private Repository Access Source: https://github.com/tecnativa/doodba/blob/master/README.md Configure SSH to use a specific private key for accessing a Git host. Ensure the private key file is placed in the ~/.ssh directory. ```yaml Host repo.example.com IdentityFile ~/.ssh/my_private_key ``` -------------------------------- ### Add Breakpoint with pudb.remote Source: https://context7.com/tecnativa/doodba/llms.txt Integrate `import pudb.remote` and `pudb.remote.set_trace()` into your Odoo code for terminal-based debugging. Specify terminal size for optimal display. ```python import pudb.remote pudb.remote.set_trace(term_size=(80, 24)) ``` -------------------------------- ### Update Specific Modules Source: https://context7.com/tecnativa/doodba/llms.txt Update specific modules in the database using `odoo --update --stop-after-init`. This command applies changes to existing modules. ```bash docker-compose run --rm odoo odoo --update my_module --stop-after-init ``` -------------------------------- ### SSH Config to Disable Host Key Checking Source: https://github.com/tecnativa/doodba/blob/master/README.md Disable strict host key checking for a specific host in SSH configuration. This can be useful for environments where host keys may change or are not managed. ```yaml Host repo.example.com StrictHostKeyChecking no ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.