kctl-odoo 0.4.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.
- kctl_odoo-0.4.0/.gitignore +33 -0
- kctl_odoo-0.4.0/PKG-INFO +301 -0
- kctl_odoo-0.4.0/README.md +272 -0
- kctl_odoo-0.4.0/docs/completions.md +69 -0
- kctl_odoo-0.4.0/e2e/.gitignore +8 -0
- kctl_odoo-0.4.0/e2e/fixtures/odoo-auth.ts +101 -0
- kctl_odoo-0.4.0/e2e/fixtures/odoo-helpers.ts +360 -0
- kctl_odoo-0.4.0/e2e/fixtures/odoo-test.ts +18 -0
- kctl_odoo-0.4.0/e2e/package-lock.json +96 -0
- kctl_odoo-0.4.0/e2e/package.json +18 -0
- kctl_odoo-0.4.0/e2e/playwright.config.ts +69 -0
- kctl_odoo-0.4.0/e2e/tests/global-setup.ts +26 -0
- kctl_odoo-0.4.0/e2e/tests/global-teardown.ts +10 -0
- kctl_odoo-0.4.0/e2e/tests/scenarios/login.spec.ts +58 -0
- kctl_odoo-0.4.0/e2e/tests/scenarios/sales-order.spec.ts +43 -0
- kctl_odoo-0.4.0/e2e/tests/scenarios/training-screenshots.spec.ts +452 -0
- kctl_odoo-0.4.0/e2e/tests/shared/navbar.spec.ts +57 -0
- kctl_odoo-0.4.0/e2e/tests/smoke/all-menus.spec.ts +148 -0
- kctl_odoo-0.4.0/e2e/tsconfig.json +20 -0
- kctl_odoo-0.4.0/pyproject.toml +82 -0
- kctl_odoo-0.4.0/scripts/generate_skill_commands.py +69 -0
- kctl_odoo-0.4.0/skills/odoo-admin/SKILL.md +1994 -0
- kctl_odoo-0.4.0/src/kctl_odoo/__init__.py +6 -0
- kctl_odoo-0.4.0/src/kctl_odoo/__main__.py +5 -0
- kctl_odoo-0.4.0/src/kctl_odoo/cli.py +366 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/__init__.py +0 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/__init__.py +105 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/_helpers.py +346 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/jv_comparator.py +623 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/jv_fixer.py +618 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/masters.py +1122 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/setup.py +851 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/status.py +384 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/transactions.py +3252 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_accurate_sync/validate_journals.py +177 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_credit_limit/__init__.py +1 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_credit_limit/accurate_command.py +1986 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_credit_limit/accurate_pull.py +584 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_credit_limit/command.py +50 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_credit_limit/compute.py +232 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/_credit_limit/readiness.py +170 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/accounting_cmd.py +2417 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/accurate.py +2343 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/addons_cmd.py +861 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/aliases.py +101 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/approvals_cmd.py +586 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/assets_cmd.py +544 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/audit_cmd.py +362 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/auto_maintain_cmd.py +259 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/automation_cmd.py +448 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/backup.py +473 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/bank_cmd.py +534 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/budget_cmd.py +311 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/bundles.py +1467 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/cleanup.py +166 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/companies.py +576 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/compliance_cmd.py +449 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/config_cmd.py +700 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/config_server.py +736 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/configure.py +610 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/crm_cmd.py +603 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/cron.py +413 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/currency_cmd.py +245 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/dashboard.py +980 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/data_quality_cmd.py +464 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/databases.py +167 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/delivery_cmd.py +467 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/deploy.py +347 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/deploy_dbfix.py +175 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/deploy_hotfix.py +444 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/deploy_uninstall.py +250 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/deploy_upgrade.py +212 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/dev.py +4623 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/dev_mode.py +142 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/diagnose.py +1186 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/diff.py +533 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/dunning_cmd.py +295 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/e2e.py +424 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/events_cmd.py +498 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/export_cmd.py +133 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/fastapi_cmd.py +1850 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/fleet_cmd.py +635 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/forms_cmd.py +364 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/generate.py +1698 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/helpdesk_cmd.py +608 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/history_cmd.py +247 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/hr_cmd.py +2398 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/icon_cmd.py +455 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/import_cmd.py +727 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/integration.py +234 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/inventory_cmd.py +1891 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/jobs.py +402 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/kpi_cmd.py +219 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/lint.py +880 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/local.py +531 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/logs.py +495 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/mail.py +543 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/maintenance.py +2945 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/manifest_cmd.py +346 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/migrate.py +871 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/mis_reports_cmd.py +1386 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/modules.py +1578 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/monitor_cmd.py +527 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/mrp_cmd.py +1439 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/onboarding_cmd.py +462 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/orm_cmd.py +468 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/partners.py +472 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/payment_gateways_cmd.py +390 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/performance.py +777 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/periods_cmd.py +267 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/pipeline.py +930 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/pos_cmd.py +2441 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/post_uninstall.py +324 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/pricelist_cmd.py +536 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/products_cmd.py +561 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/profiles.py +384 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/project_cmd.py +334 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/purchasing_cmd.py +1015 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/quality_cmd.py +265 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/readiness.py +2812 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/record_rules.py +261 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/repl.py +356 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report.py +2851 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_cmd.py +555 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_custom_query_cmd.py +381 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_drill_route_cmd.py +371 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_format_cmd.py +315 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_formats_cmd.py +1007 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_schedule_cmd.py +570 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_subkpi_cmd.py +301 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/report_type_cmd.py +481 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/roles.py +750 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/sales_cmd.py +1152 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/scaffold_print_report.py +295 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/security.py +1696 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/self_test.py +373 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/sequences_cmd.py +251 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/sessions.py +282 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/setup.py +832 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/shell.py +51 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/skill_cmd.py +76 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/sql_export_cmd.py +610 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/staging_cmd.py +234 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/statements_cmd.py +373 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/storage.py +706 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/support_cmd.py +277 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/tax_cmd.py +1026 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/tenants.py +319 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/testing.py +479 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/traceback_cmd.py +299 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/translations_cmd.py +282 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/troubleshoot.py +817 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/users.py +563 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/views.py +335 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/website_cmd.py +676 -0
- kctl_odoo-0.4.0/src/kctl_odoo/commands/workers.py +228 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/__init__.py +0 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/addons.py +387 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/async_client.py +281 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/biz_helpers.py +64 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/bundles.py +336 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/callbacks.py +48 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/client.py +329 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/config.py +302 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/exceptions.py +56 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/field_helpers.py +203 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/history.py +271 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/local.py +264 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/output.py +5 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/plugins.py +35 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/resolve.py +167 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/roles.py +355 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/runner.py +5 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/setup_helpers.py +544 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/snapshots.py +161 -0
- kctl_odoo-0.4.0/src/kctl_odoo/core/utils.py +87 -0
- kctl_odoo-0.4.0/src/kctl_odoo/schema.py +19 -0
- kctl_odoo-0.4.0/tests/__init__.py +0 -0
- kctl_odoo-0.4.0/tests/conftest.py +126 -0
- kctl_odoo-0.4.0/tests/test_accountant_workflows.py +123 -0
- kctl_odoo-0.4.0/tests/test_accounting_enhanced.py +269 -0
- kctl_odoo-0.4.0/tests/test_addons_cmd.py +351 -0
- kctl_odoo-0.4.0/tests/test_addons_core.py +776 -0
- kctl_odoo-0.4.0/tests/test_admin_gaps.py +67 -0
- kctl_odoo-0.4.0/tests/test_approvals_cmd.py +327 -0
- kctl_odoo-0.4.0/tests/test_audit_fix.py +91 -0
- kctl_odoo-0.4.0/tests/test_audit_logic.py +57 -0
- kctl_odoo-0.4.0/tests/test_auto_maintain_cmd.py +146 -0
- kctl_odoo-0.4.0/tests/test_automation_cmd.py +347 -0
- kctl_odoo-0.4.0/tests/test_biz_enhanced.py +157 -0
- kctl_odoo-0.4.0/tests/test_bundles.py +519 -0
- kctl_odoo-0.4.0/tests/test_bundles_authoring.py +264 -0
- kctl_odoo-0.4.0/tests/test_bundles_validate.py +261 -0
- kctl_odoo-0.4.0/tests/test_cleanup.py +199 -0
- kctl_odoo-0.4.0/tests/test_config_server.py +377 -0
- kctl_odoo-0.4.0/tests/test_config_show_mask.py +147 -0
- kctl_odoo-0.4.0/tests/test_credit_limit_accurate_pull.py +371 -0
- kctl_odoo-0.4.0/tests/test_credit_limit_command.py +15 -0
- kctl_odoo-0.4.0/tests/test_credit_limit_compute.py +343 -0
- kctl_odoo-0.4.0/tests/test_credit_limit_readiness.py +203 -0
- kctl_odoo-0.4.0/tests/test_currency_cmd.py +189 -0
- kctl_odoo-0.4.0/tests/test_data_quality_cmd.py +266 -0
- kctl_odoo-0.4.0/tests/test_data_quality_enhanced.py +67 -0
- kctl_odoo-0.4.0/tests/test_dev_audit.py +72 -0
- kctl_odoo-0.4.0/tests/test_dev_workflow.py +67 -0
- kctl_odoo-0.4.0/tests/test_diagnose.py +391 -0
- kctl_odoo-0.4.0/tests/test_diagnose_autofix.py +45 -0
- kctl_odoo-0.4.0/tests/test_e2e.py +285 -0
- kctl_odoo-0.4.0/tests/test_events_cmd.py +169 -0
- kctl_odoo-0.4.0/tests/test_fastapi_audit.py +39 -0
- kctl_odoo-0.4.0/tests/test_field_helpers.py +104 -0
- kctl_odoo-0.4.0/tests/test_finance_enhanced.py +329 -0
- kctl_odoo-0.4.0/tests/test_fleet_cmd.py +163 -0
- kctl_odoo-0.4.0/tests/test_foundation_ops.py +414 -0
- kctl_odoo-0.4.0/tests/test_generate.py +297 -0
- kctl_odoo-0.4.0/tests/test_helpdesk_cmd.py +163 -0
- kctl_odoo-0.4.0/tests/test_history.py +311 -0
- kctl_odoo-0.4.0/tests/test_icon_cmd.py +261 -0
- kctl_odoo-0.4.0/tests/test_logs_sticky.py +119 -0
- kctl_odoo-0.4.0/tests/test_logs_tail.py +157 -0
- kctl_odoo-0.4.0/tests/test_mgmt_reports.py +53 -0
- kctl_odoo-0.4.0/tests/test_modules_extended.py +390 -0
- kctl_odoo-0.4.0/tests/test_monitor_cmd.py +300 -0
- kctl_odoo-0.4.0/tests/test_mrp_cmd.py +193 -0
- kctl_odoo-0.4.0/tests/test_mrp_hr_enhanced.py +88 -0
- kctl_odoo-0.4.0/tests/test_new_commands.py +205 -0
- kctl_odoo-0.4.0/tests/test_operations_complete.py +307 -0
- kctl_odoo-0.4.0/tests/test_output.py +193 -0
- kctl_odoo-0.4.0/tests/test_perf_detection.py +60 -0
- kctl_odoo-0.4.0/tests/test_performance_opts.py +124 -0
- kctl_odoo-0.4.0/tests/test_pipeline.py +517 -0
- kctl_odoo-0.4.0/tests/test_pos_cmd.py +234 -0
- kctl_odoo-0.4.0/tests/test_pos_enhanced.py +135 -0
- kctl_odoo-0.4.0/tests/test_pricelist_cmd.py +396 -0
- kctl_odoo-0.4.0/tests/test_profile_resolution.py +65 -0
- kctl_odoo-0.4.0/tests/test_report_cmd.py +197 -0
- kctl_odoo-0.4.0/tests/test_roles_commands.py +537 -0
- kctl_odoo-0.4.0/tests/test_roles_core.py +298 -0
- kctl_odoo-0.4.0/tests/test_runner.py +213 -0
- kctl_odoo-0.4.0/tests/test_schema.py +35 -0
- kctl_odoo-0.4.0/tests/test_self_test.py +61 -0
- kctl_odoo-0.4.0/tests/test_sequences_cmd.py +216 -0
- kctl_odoo-0.4.0/tests/test_smoke.py +153 -0
- kctl_odoo-0.4.0/tests/test_snapshots.py +410 -0
- kctl_odoo-0.4.0/tests/test_staging_cmd.py +368 -0
- kctl_odoo-0.4.0/tests/test_troubleshoot.py +281 -0
- kctl_odoo-0.4.0/tests/test_wave5_dev.py +178 -0
- kctl_odoo-0.4.0/tests/test_wave5_migrate.py +46 -0
- kctl_odoo-0.4.0/tests/test_wave5_orm_perf.py +53 -0
- kctl_odoo-0.4.0/tests/test_wave5_report.py +117 -0
- kctl_odoo-0.4.0/tests/test_wave5_scaffold.py +85 -0
- kctl_odoo-0.4.0/tests/test_wave5_security.py +53 -0
- kctl_odoo-0.4.0/tests/test_wave5_storage.py +94 -0
- kctl_odoo-0.4.0/tests/test_website_cmd.py +299 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
*.egg
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
.eggs/
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
|
|
14
|
+
# IDE
|
|
15
|
+
.idea/
|
|
16
|
+
.vscode/
|
|
17
|
+
*.swp
|
|
18
|
+
*.swo
|
|
19
|
+
|
|
20
|
+
# Testing
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.coverage
|
|
23
|
+
htmlcov/
|
|
24
|
+
.mypy_cache/
|
|
25
|
+
.ruff_cache/
|
|
26
|
+
|
|
27
|
+
# OS
|
|
28
|
+
.DS_Store
|
|
29
|
+
Thumbs.db
|
|
30
|
+
|
|
31
|
+
# Environment
|
|
32
|
+
.env
|
|
33
|
+
.env.local
|
kctl_odoo-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kctl-odoo
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Kodemeio Odoo CLI - manage Odoo 18 ERP instances
|
|
5
|
+
Author-email: Kodemeio <dev@kodeme.io>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: cli,erp,json-rpc,kodemeio,odoo
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: System Administrators
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: System :: Systems Administration
|
|
15
|
+
Requires-Python: >=3.12
|
|
16
|
+
Requires-Dist: httpx>=0.28.0
|
|
17
|
+
Requires-Dist: kctl-lib>=0.4.0
|
|
18
|
+
Requires-Dist: kodemeio-accurate>=0.5.0
|
|
19
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
20
|
+
Requires-Dist: pyyaml>=6.0
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: mypy>=1.14.0; extra == 'dev'
|
|
23
|
+
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
|
|
24
|
+
Requires-Dist: pytest-httpx>=0.35.0; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest>=8.3.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: ruff>=0.9.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# kctl-odoo
|
|
31
|
+
|
|
32
|
+
Kodemeio Odoo CLI -- manage Odoo 18 ERP instances via JSON-RPC and Docker Compose.
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uv tool install ./cli
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
To upgrade after code changes:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
uv tool install --force --reinstall ./cli
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Quick Start
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Configure connection (interactive)
|
|
50
|
+
kctl-odoo config init
|
|
51
|
+
|
|
52
|
+
# Verify connectivity
|
|
53
|
+
kctl-odoo config test
|
|
54
|
+
|
|
55
|
+
# Dashboard overview
|
|
56
|
+
kctl-odoo dashboard info
|
|
57
|
+
|
|
58
|
+
# List installed modules
|
|
59
|
+
kctl-odoo modules list --state installed
|
|
60
|
+
|
|
61
|
+
# Health check
|
|
62
|
+
kctl-odoo troubleshoot check
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Fast debugging — log tailing
|
|
66
|
+
|
|
67
|
+
`kctl-odoo logs tail` is a unified streaming command for local + remote Odoo
|
|
68
|
+
with structured filters. It auto-detects the transport from the current
|
|
69
|
+
profile URL:
|
|
70
|
+
|
|
71
|
+
- **local** (`localhost` / `127.0.0.1`) → streams `docker compose logs -f` in
|
|
72
|
+
the project directory.
|
|
73
|
+
- **remote** → streams `docker logs -f` over SSH via `kctl-dokploy compose
|
|
74
|
+
service-logs --follow`. Requires `--compose-id` (find with `kctl-dokploy
|
|
75
|
+
compose list`).
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Local dev — stream everything
|
|
79
|
+
kctl-odoo logs tail
|
|
80
|
+
|
|
81
|
+
# Local dev — only warnings and above from the account.move module
|
|
82
|
+
kctl-odoo logs tail --level WARNING --module account.move
|
|
83
|
+
|
|
84
|
+
# Remote prod — stream tpp-odoo-erp
|
|
85
|
+
kctl-odoo -p idtpp-tpp-odoo-erp logs tail \
|
|
86
|
+
--dokploy-profile idtpp \
|
|
87
|
+
--compose-id Qki8U2u4Ltstq0_6zW7UE
|
|
88
|
+
|
|
89
|
+
# Narrow by worker PID or request id in the message
|
|
90
|
+
kctl-odoo logs tail --worker 12 --grep "traceback"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Filter flags compose as AND: `--level`, `--module`, `--request`, `--worker`,
|
|
94
|
+
`--grep`.
|
|
95
|
+
|
|
96
|
+
**Full traceback capture.** Filters apply per *log record*, not per line. When
|
|
97
|
+
a record's timestamped header matches, all of its continuation lines
|
|
98
|
+
(`Traceback (most recent call last):`, `File "..."`, `^^^`, exception
|
|
99
|
+
message) are emitted too — stack traces survive `--level ERROR` or any
|
|
100
|
+
other filter. `--grep` can also match a continuation line directly (e.g.
|
|
101
|
+
`--grep "fields.py"` to find tracebacks involving a specific file); when
|
|
102
|
+
it does, the rest of that record's block is included.
|
|
103
|
+
|
|
104
|
+
Other `logs` subcommands:
|
|
105
|
+
|
|
106
|
+
- `logs follow` — legacy local-only streamer (kept for back-compat).
|
|
107
|
+
- `logs errors --days N` — finite query against Odoo's `ir.logging` model.
|
|
108
|
+
- `logs search <pattern>` — finite ilike search against `ir.logging`.
|
|
109
|
+
|
|
110
|
+
## Command Groups
|
|
111
|
+
|
|
112
|
+
| Group | Description |
|
|
113
|
+
|------------------|------------------------------------------------------|
|
|
114
|
+
| `accounting` | Accounting transactional operations (invoices, payments, entries) |
|
|
115
|
+
| `backup` | Database backup and restore operations |
|
|
116
|
+
| `bundles` | Module bundle management (install/list YAML bundles) |
|
|
117
|
+
| `cleanup` | Stale data cleanup operations |
|
|
118
|
+
| `companies` | Company and multi-company management |
|
|
119
|
+
| `config` | CLI configuration (profiles, init, test) |
|
|
120
|
+
| `cron` | Scheduled action (ir.cron) management |
|
|
121
|
+
| `dashboard` | Instance overview and statistics |
|
|
122
|
+
| `databases` | Database CRUD operations |
|
|
123
|
+
| `deploy` | Deployment and release management |
|
|
124
|
+
| `dev` | Developer tools (scaffold, aggregate, link-addons) |
|
|
125
|
+
| `diff` | Compare module states across databases/snapshots |
|
|
126
|
+
| `export` | Data export (CSV, JSON, XML) |
|
|
127
|
+
| `generate` | Code generation (module scaffold, models, views) |
|
|
128
|
+
| `history` | Operation history tracking |
|
|
129
|
+
| `hr` | HR operations (employees, leaves, payslips, expenses) |
|
|
130
|
+
| `import` | Data import from files |
|
|
131
|
+
| `integration` | External integration management |
|
|
132
|
+
| `inventory` | Inventory operations (stock, transfers, adjustments) |
|
|
133
|
+
| `jobs` | Background job / queue_job management |
|
|
134
|
+
| `local` | Docker Compose lifecycle (up, down, restart, logs) |
|
|
135
|
+
| `logs` | Container log streaming and filtering |
|
|
136
|
+
| `mail` | Mail server and outgoing email management |
|
|
137
|
+
| `maintenance` | Database maintenance (vacuum, reindex, cleanup) |
|
|
138
|
+
| `master-data` | Master data configuration and seeding |
|
|
139
|
+
| `migrate` | Data migration tools and utilities |
|
|
140
|
+
| `modules` | Module install, upgrade, list, and info |
|
|
141
|
+
| `partners` | Partner (res.partner) queries and bulk ops |
|
|
142
|
+
| `performance` | Performance profiling and slow-query analysis |
|
|
143
|
+
| `profiles` | Installation profile management |
|
|
144
|
+
| `purchasing` | Purchasing operations (POs, receipts, vendor bills) |
|
|
145
|
+
| `repl` | Interactive Python REPL with Odoo connection |
|
|
146
|
+
| `report` | Report template and PDF management |
|
|
147
|
+
| `sales` | Sales operations (SOs, deliveries, CRM pipeline) |
|
|
148
|
+
| `security` | Access rights, record rules, and audit |
|
|
149
|
+
| `server` | Server configuration, system parameters, and tuning |
|
|
150
|
+
| `sessions` | User session inspection and cleanup |
|
|
151
|
+
| `shell` | Interactive Odoo shell (inside container) |
|
|
152
|
+
| `storage` | Attachment and filestore management |
|
|
153
|
+
| `tax` | Indonesian tax operations (PPN/PPh summaries, faktur) |
|
|
154
|
+
| `tenants` | Multi-tenant / SaaS instance management |
|
|
155
|
+
| `test` | Test runner with result parsing and summary |
|
|
156
|
+
| `troubleshoot` | Diagnostic commands, health checks, and connectivity |
|
|
157
|
+
| `users` | User CRUD, password reset, role management |
|
|
158
|
+
| `workers` | Worker process inspection and scaling |
|
|
159
|
+
|
|
160
|
+
## Command Aliases
|
|
161
|
+
|
|
162
|
+
Hidden short aliases are available for common workflows:
|
|
163
|
+
|
|
164
|
+
| Alias | Expands to |
|
|
165
|
+
|-------|--------------------------|
|
|
166
|
+
| `mi` | `modules install <name>` |
|
|
167
|
+
| `mu` | `modules upgrade <name>` |
|
|
168
|
+
| `ml` | `modules list` |
|
|
169
|
+
| `hc` | `troubleshoot check` |
|
|
170
|
+
| `di` | `dashboard info` |
|
|
171
|
+
| `bl` | `bundles list` |
|
|
172
|
+
| `bi` | `bundles install <name>` |
|
|
173
|
+
| `pl` | `profiles list` |
|
|
174
|
+
| `pi` | `profiles install <name>`|
|
|
175
|
+
| `tr` | `test run <module>` |
|
|
176
|
+
|
|
177
|
+
Example:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
kctl-odoo mi sale_management # same as: kctl-odoo modules install sale_management
|
|
181
|
+
kctl-odoo tr base_management # same as: kctl-odoo test run base_management
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Global Options
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
--json Output as JSON (machine-readable)
|
|
188
|
+
--quiet, -q Suppress informational messages
|
|
189
|
+
--profile, -p Use a named config profile
|
|
190
|
+
--url Odoo URL override
|
|
191
|
+
--api-key API key override
|
|
192
|
+
--database, -d Database override
|
|
193
|
+
--username, -u Username override
|
|
194
|
+
--version, -V Show version and exit
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Configuration
|
|
198
|
+
|
|
199
|
+
### Profiles
|
|
200
|
+
|
|
201
|
+
kctl-odoo supports named profiles for managing multiple Odoo instances:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Create profiles
|
|
205
|
+
kctl-odoo config add production --url https://erp.kodeme.io --database kodemeio --api-key $KEY
|
|
206
|
+
kctl-odoo config add staging --url https://staging.kodeme.io --database staging --api-key $KEY
|
|
207
|
+
|
|
208
|
+
# Switch default profile
|
|
209
|
+
kctl-odoo config use production
|
|
210
|
+
|
|
211
|
+
# Use per-command
|
|
212
|
+
kctl-odoo --profile staging modules list
|
|
213
|
+
|
|
214
|
+
# List all profiles
|
|
215
|
+
kctl-odoo config list
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Config File
|
|
219
|
+
|
|
220
|
+
Configuration is stored in `~/.config/kctl-odoo/config.toml` (XDG-compliant).
|
|
221
|
+
|
|
222
|
+
## Shell Completions
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Install for your shell
|
|
226
|
+
kctl-odoo --install-completion bash
|
|
227
|
+
kctl-odoo --install-completion zsh
|
|
228
|
+
kctl-odoo --install-completion fish
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
See [docs/completions.md](docs/completions.md) for manual installation and troubleshooting.
|
|
232
|
+
|
|
233
|
+
## Plugin Development
|
|
234
|
+
|
|
235
|
+
kctl-odoo supports extending the CLI via Python entry points. Create a package that
|
|
236
|
+
registers a Typer app under the `kctl_odoo.plugins` entry point group:
|
|
237
|
+
|
|
238
|
+
```toml
|
|
239
|
+
# In your plugin's pyproject.toml
|
|
240
|
+
[project.entry-points."kctl_odoo.plugins"]
|
|
241
|
+
my_plugin = "my_plugin.cli:app"
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The plugin's `app` (a `typer.Typer` instance) will be registered as a command group
|
|
245
|
+
automatically on startup.
|
|
246
|
+
|
|
247
|
+
## New in This Version
|
|
248
|
+
|
|
249
|
+
- **SQLite history tracking** — All CLI operations are recorded locally. Use `kctl-odoo history` to query past commands, timings, and outcomes.
|
|
250
|
+
- **Runner abstraction** — Subprocess management extracted into a reusable `Runner` class in `core/`, replacing ad-hoc `subprocess.run` calls.
|
|
251
|
+
- **Command group consolidation** — Reduced from 58 to 53 groups. `biz` group eliminated; 22 business commands redistributed to `sales`, `purchasing`, `inventory`, `hr`, `accounting`, `dashboard`. `maintenance update-list` moved to `modules scan`. `maintenance accounting-close` / `inventory-close` moved to `accounting close-period` / `inventory close-period`. `maintenance run-autovacuum` renamed to `maintenance autovacuum`.
|
|
252
|
+
- **Verb-first command names** — 52 commands renamed to verb-first pattern (e.g., `invoice-get` → `get-invoice`, `order-confirm` → `confirm-order`). 11 duplicate commands removed.
|
|
253
|
+
|
|
254
|
+
## Development
|
|
255
|
+
|
|
256
|
+
### Running Tests
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
cd cli
|
|
260
|
+
uv run pytest tests/ -v
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Linting and Formatting
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
cd cli
|
|
267
|
+
uv run ruff check src/
|
|
268
|
+
uv run ruff format src/
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Type Checking
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
cd cli
|
|
275
|
+
uv run mypy src/kctl_odoo/
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Project Structure
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
cli/
|
|
282
|
+
src/kctl_odoo/
|
|
283
|
+
cli.py Main app + command registration
|
|
284
|
+
__init__.py Version
|
|
285
|
+
core/
|
|
286
|
+
callbacks.py Global option handling (AppContext)
|
|
287
|
+
client.py JSON-RPC client for remote Odoo
|
|
288
|
+
local.py Docker Compose client for local dev
|
|
289
|
+
config.py Profile/config management
|
|
290
|
+
exceptions.py Custom exception hierarchy
|
|
291
|
+
output.py Output formatting (table, JSON, plain)
|
|
292
|
+
commands/
|
|
293
|
+
aliases.py Short command aliases
|
|
294
|
+
modules.py Module management
|
|
295
|
+
testing.py Test runner with result parsing
|
|
296
|
+
... (50+ command modules)
|
|
297
|
+
tests/ pytest test suite
|
|
298
|
+
pyproject.toml Package metadata and tool config
|
|
299
|
+
README.md This file
|
|
300
|
+
docs/ Additional documentation
|
|
301
|
+
```
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# kctl-odoo
|
|
2
|
+
|
|
3
|
+
Kodemeio Odoo CLI -- manage Odoo 18 ERP instances via JSON-RPC and Docker Compose.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
uv tool install ./cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
To upgrade after code changes:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uv tool install --force --reinstall ./cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Configure connection (interactive)
|
|
21
|
+
kctl-odoo config init
|
|
22
|
+
|
|
23
|
+
# Verify connectivity
|
|
24
|
+
kctl-odoo config test
|
|
25
|
+
|
|
26
|
+
# Dashboard overview
|
|
27
|
+
kctl-odoo dashboard info
|
|
28
|
+
|
|
29
|
+
# List installed modules
|
|
30
|
+
kctl-odoo modules list --state installed
|
|
31
|
+
|
|
32
|
+
# Health check
|
|
33
|
+
kctl-odoo troubleshoot check
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Fast debugging — log tailing
|
|
37
|
+
|
|
38
|
+
`kctl-odoo logs tail` is a unified streaming command for local + remote Odoo
|
|
39
|
+
with structured filters. It auto-detects the transport from the current
|
|
40
|
+
profile URL:
|
|
41
|
+
|
|
42
|
+
- **local** (`localhost` / `127.0.0.1`) → streams `docker compose logs -f` in
|
|
43
|
+
the project directory.
|
|
44
|
+
- **remote** → streams `docker logs -f` over SSH via `kctl-dokploy compose
|
|
45
|
+
service-logs --follow`. Requires `--compose-id` (find with `kctl-dokploy
|
|
46
|
+
compose list`).
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Local dev — stream everything
|
|
50
|
+
kctl-odoo logs tail
|
|
51
|
+
|
|
52
|
+
# Local dev — only warnings and above from the account.move module
|
|
53
|
+
kctl-odoo logs tail --level WARNING --module account.move
|
|
54
|
+
|
|
55
|
+
# Remote prod — stream tpp-odoo-erp
|
|
56
|
+
kctl-odoo -p idtpp-tpp-odoo-erp logs tail \
|
|
57
|
+
--dokploy-profile idtpp \
|
|
58
|
+
--compose-id Qki8U2u4Ltstq0_6zW7UE
|
|
59
|
+
|
|
60
|
+
# Narrow by worker PID or request id in the message
|
|
61
|
+
kctl-odoo logs tail --worker 12 --grep "traceback"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Filter flags compose as AND: `--level`, `--module`, `--request`, `--worker`,
|
|
65
|
+
`--grep`.
|
|
66
|
+
|
|
67
|
+
**Full traceback capture.** Filters apply per *log record*, not per line. When
|
|
68
|
+
a record's timestamped header matches, all of its continuation lines
|
|
69
|
+
(`Traceback (most recent call last):`, `File "..."`, `^^^`, exception
|
|
70
|
+
message) are emitted too — stack traces survive `--level ERROR` or any
|
|
71
|
+
other filter. `--grep` can also match a continuation line directly (e.g.
|
|
72
|
+
`--grep "fields.py"` to find tracebacks involving a specific file); when
|
|
73
|
+
it does, the rest of that record's block is included.
|
|
74
|
+
|
|
75
|
+
Other `logs` subcommands:
|
|
76
|
+
|
|
77
|
+
- `logs follow` — legacy local-only streamer (kept for back-compat).
|
|
78
|
+
- `logs errors --days N` — finite query against Odoo's `ir.logging` model.
|
|
79
|
+
- `logs search <pattern>` — finite ilike search against `ir.logging`.
|
|
80
|
+
|
|
81
|
+
## Command Groups
|
|
82
|
+
|
|
83
|
+
| Group | Description |
|
|
84
|
+
|------------------|------------------------------------------------------|
|
|
85
|
+
| `accounting` | Accounting transactional operations (invoices, payments, entries) |
|
|
86
|
+
| `backup` | Database backup and restore operations |
|
|
87
|
+
| `bundles` | Module bundle management (install/list YAML bundles) |
|
|
88
|
+
| `cleanup` | Stale data cleanup operations |
|
|
89
|
+
| `companies` | Company and multi-company management |
|
|
90
|
+
| `config` | CLI configuration (profiles, init, test) |
|
|
91
|
+
| `cron` | Scheduled action (ir.cron) management |
|
|
92
|
+
| `dashboard` | Instance overview and statistics |
|
|
93
|
+
| `databases` | Database CRUD operations |
|
|
94
|
+
| `deploy` | Deployment and release management |
|
|
95
|
+
| `dev` | Developer tools (scaffold, aggregate, link-addons) |
|
|
96
|
+
| `diff` | Compare module states across databases/snapshots |
|
|
97
|
+
| `export` | Data export (CSV, JSON, XML) |
|
|
98
|
+
| `generate` | Code generation (module scaffold, models, views) |
|
|
99
|
+
| `history` | Operation history tracking |
|
|
100
|
+
| `hr` | HR operations (employees, leaves, payslips, expenses) |
|
|
101
|
+
| `import` | Data import from files |
|
|
102
|
+
| `integration` | External integration management |
|
|
103
|
+
| `inventory` | Inventory operations (stock, transfers, adjustments) |
|
|
104
|
+
| `jobs` | Background job / queue_job management |
|
|
105
|
+
| `local` | Docker Compose lifecycle (up, down, restart, logs) |
|
|
106
|
+
| `logs` | Container log streaming and filtering |
|
|
107
|
+
| `mail` | Mail server and outgoing email management |
|
|
108
|
+
| `maintenance` | Database maintenance (vacuum, reindex, cleanup) |
|
|
109
|
+
| `master-data` | Master data configuration and seeding |
|
|
110
|
+
| `migrate` | Data migration tools and utilities |
|
|
111
|
+
| `modules` | Module install, upgrade, list, and info |
|
|
112
|
+
| `partners` | Partner (res.partner) queries and bulk ops |
|
|
113
|
+
| `performance` | Performance profiling and slow-query analysis |
|
|
114
|
+
| `profiles` | Installation profile management |
|
|
115
|
+
| `purchasing` | Purchasing operations (POs, receipts, vendor bills) |
|
|
116
|
+
| `repl` | Interactive Python REPL with Odoo connection |
|
|
117
|
+
| `report` | Report template and PDF management |
|
|
118
|
+
| `sales` | Sales operations (SOs, deliveries, CRM pipeline) |
|
|
119
|
+
| `security` | Access rights, record rules, and audit |
|
|
120
|
+
| `server` | Server configuration, system parameters, and tuning |
|
|
121
|
+
| `sessions` | User session inspection and cleanup |
|
|
122
|
+
| `shell` | Interactive Odoo shell (inside container) |
|
|
123
|
+
| `storage` | Attachment and filestore management |
|
|
124
|
+
| `tax` | Indonesian tax operations (PPN/PPh summaries, faktur) |
|
|
125
|
+
| `tenants` | Multi-tenant / SaaS instance management |
|
|
126
|
+
| `test` | Test runner with result parsing and summary |
|
|
127
|
+
| `troubleshoot` | Diagnostic commands, health checks, and connectivity |
|
|
128
|
+
| `users` | User CRUD, password reset, role management |
|
|
129
|
+
| `workers` | Worker process inspection and scaling |
|
|
130
|
+
|
|
131
|
+
## Command Aliases
|
|
132
|
+
|
|
133
|
+
Hidden short aliases are available for common workflows:
|
|
134
|
+
|
|
135
|
+
| Alias | Expands to |
|
|
136
|
+
|-------|--------------------------|
|
|
137
|
+
| `mi` | `modules install <name>` |
|
|
138
|
+
| `mu` | `modules upgrade <name>` |
|
|
139
|
+
| `ml` | `modules list` |
|
|
140
|
+
| `hc` | `troubleshoot check` |
|
|
141
|
+
| `di` | `dashboard info` |
|
|
142
|
+
| `bl` | `bundles list` |
|
|
143
|
+
| `bi` | `bundles install <name>` |
|
|
144
|
+
| `pl` | `profiles list` |
|
|
145
|
+
| `pi` | `profiles install <name>`|
|
|
146
|
+
| `tr` | `test run <module>` |
|
|
147
|
+
|
|
148
|
+
Example:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
kctl-odoo mi sale_management # same as: kctl-odoo modules install sale_management
|
|
152
|
+
kctl-odoo tr base_management # same as: kctl-odoo test run base_management
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Global Options
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
--json Output as JSON (machine-readable)
|
|
159
|
+
--quiet, -q Suppress informational messages
|
|
160
|
+
--profile, -p Use a named config profile
|
|
161
|
+
--url Odoo URL override
|
|
162
|
+
--api-key API key override
|
|
163
|
+
--database, -d Database override
|
|
164
|
+
--username, -u Username override
|
|
165
|
+
--version, -V Show version and exit
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Configuration
|
|
169
|
+
|
|
170
|
+
### Profiles
|
|
171
|
+
|
|
172
|
+
kctl-odoo supports named profiles for managing multiple Odoo instances:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Create profiles
|
|
176
|
+
kctl-odoo config add production --url https://erp.kodeme.io --database kodemeio --api-key $KEY
|
|
177
|
+
kctl-odoo config add staging --url https://staging.kodeme.io --database staging --api-key $KEY
|
|
178
|
+
|
|
179
|
+
# Switch default profile
|
|
180
|
+
kctl-odoo config use production
|
|
181
|
+
|
|
182
|
+
# Use per-command
|
|
183
|
+
kctl-odoo --profile staging modules list
|
|
184
|
+
|
|
185
|
+
# List all profiles
|
|
186
|
+
kctl-odoo config list
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Config File
|
|
190
|
+
|
|
191
|
+
Configuration is stored in `~/.config/kctl-odoo/config.toml` (XDG-compliant).
|
|
192
|
+
|
|
193
|
+
## Shell Completions
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Install for your shell
|
|
197
|
+
kctl-odoo --install-completion bash
|
|
198
|
+
kctl-odoo --install-completion zsh
|
|
199
|
+
kctl-odoo --install-completion fish
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
See [docs/completions.md](docs/completions.md) for manual installation and troubleshooting.
|
|
203
|
+
|
|
204
|
+
## Plugin Development
|
|
205
|
+
|
|
206
|
+
kctl-odoo supports extending the CLI via Python entry points. Create a package that
|
|
207
|
+
registers a Typer app under the `kctl_odoo.plugins` entry point group:
|
|
208
|
+
|
|
209
|
+
```toml
|
|
210
|
+
# In your plugin's pyproject.toml
|
|
211
|
+
[project.entry-points."kctl_odoo.plugins"]
|
|
212
|
+
my_plugin = "my_plugin.cli:app"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The plugin's `app` (a `typer.Typer` instance) will be registered as a command group
|
|
216
|
+
automatically on startup.
|
|
217
|
+
|
|
218
|
+
## New in This Version
|
|
219
|
+
|
|
220
|
+
- **SQLite history tracking** — All CLI operations are recorded locally. Use `kctl-odoo history` to query past commands, timings, and outcomes.
|
|
221
|
+
- **Runner abstraction** — Subprocess management extracted into a reusable `Runner` class in `core/`, replacing ad-hoc `subprocess.run` calls.
|
|
222
|
+
- **Command group consolidation** — Reduced from 58 to 53 groups. `biz` group eliminated; 22 business commands redistributed to `sales`, `purchasing`, `inventory`, `hr`, `accounting`, `dashboard`. `maintenance update-list` moved to `modules scan`. `maintenance accounting-close` / `inventory-close` moved to `accounting close-period` / `inventory close-period`. `maintenance run-autovacuum` renamed to `maintenance autovacuum`.
|
|
223
|
+
- **Verb-first command names** — 52 commands renamed to verb-first pattern (e.g., `invoice-get` → `get-invoice`, `order-confirm` → `confirm-order`). 11 duplicate commands removed.
|
|
224
|
+
|
|
225
|
+
## Development
|
|
226
|
+
|
|
227
|
+
### Running Tests
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
cd cli
|
|
231
|
+
uv run pytest tests/ -v
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Linting and Formatting
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
cd cli
|
|
238
|
+
uv run ruff check src/
|
|
239
|
+
uv run ruff format src/
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Type Checking
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
cd cli
|
|
246
|
+
uv run mypy src/kctl_odoo/
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Project Structure
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
cli/
|
|
253
|
+
src/kctl_odoo/
|
|
254
|
+
cli.py Main app + command registration
|
|
255
|
+
__init__.py Version
|
|
256
|
+
core/
|
|
257
|
+
callbacks.py Global option handling (AppContext)
|
|
258
|
+
client.py JSON-RPC client for remote Odoo
|
|
259
|
+
local.py Docker Compose client for local dev
|
|
260
|
+
config.py Profile/config management
|
|
261
|
+
exceptions.py Custom exception hierarchy
|
|
262
|
+
output.py Output formatting (table, JSON, plain)
|
|
263
|
+
commands/
|
|
264
|
+
aliases.py Short command aliases
|
|
265
|
+
modules.py Module management
|
|
266
|
+
testing.py Test runner with result parsing
|
|
267
|
+
... (50+ command modules)
|
|
268
|
+
tests/ pytest test suite
|
|
269
|
+
pyproject.toml Package metadata and tool config
|
|
270
|
+
README.md This file
|
|
271
|
+
docs/ Additional documentation
|
|
272
|
+
```
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Shell Completions
|
|
2
|
+
|
|
3
|
+
kctl-odoo uses Typer which provides automatic shell completion.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Bash
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
kctl-odoo --install-completion bash
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Zsh
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
kctl-odoo --install-completion zsh
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Fish
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
kctl-odoo --install-completion fish
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Manual Installation
|
|
26
|
+
|
|
27
|
+
### Bash
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
eval "$(_KCTL_ODOO_COMPLETE=bash_source kctl-odoo)"
|
|
31
|
+
|
|
32
|
+
# Or add to ~/.bashrc for persistence:
|
|
33
|
+
echo 'eval "$(_KCTL_ODOO_COMPLETE=bash_source kctl-odoo)"' >> ~/.bashrc
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Zsh
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
eval "$(_KCTL_ODOO_COMPLETE=zsh_source kctl-odoo)"
|
|
40
|
+
|
|
41
|
+
# Or add to ~/.zshrc for persistence:
|
|
42
|
+
echo 'eval "$(_KCTL_ODOO_COMPLETE=zsh_source kctl-odoo)"' >> ~/.zshrc
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Fish
|
|
46
|
+
|
|
47
|
+
```fish
|
|
48
|
+
# Add to ~/.config/fish/completions/kctl-odoo.fish:
|
|
49
|
+
eval (env _KCTL_ODOO_COMPLETE=fish_source kctl-odoo)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Verify
|
|
53
|
+
|
|
54
|
+
After installation, restart your shell and try:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
kctl-odoo <TAB><TAB> # Shows all command groups
|
|
58
|
+
kctl-odoo modules <TAB> # Shows subcommands (install, upgrade, list, info)
|
|
59
|
+
kctl-odoo --<TAB> # Shows global options (--json, --profile, etc.)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Troubleshooting
|
|
63
|
+
|
|
64
|
+
If completions are not working:
|
|
65
|
+
|
|
66
|
+
1. Make sure `kctl-odoo` is on your `$PATH` (installed via `uv tool install`).
|
|
67
|
+
2. Restart your shell or source your rc file (`source ~/.zshrc`).
|
|
68
|
+
3. For Zsh, ensure `compinit` is called in your `~/.zshrc` before the completion eval.
|
|
69
|
+
4. Try the manual installation method above if `--install-completion` does not work.
|