Deployment¶
Last Updated: February 2026
Upgrade & Deployment Checklist¶
Before deploying a module update:
- Test locally — Run
-u module_name --stop-after-initontest1and check for errors - Check access rules — If you added new models, ensure
ir.model.access.csvcovers them - Check data files — Ensure all XML IDs are unique and
ref()calls point to valid records - Test the UI — Open the module in the browser, test all views and buttons
- Commit and push — Push to
janbranch - Deploy to test server —
ssh dan@exp.scottrecycling.com 'git -C /opt/odoo/custom_addons/Dan-Odoo pull origin jan' - Upgrade on test — Run the upgrade command on the test server and verify
- Get approval — Have a team member review before merging to
main
Upgrade Command¶
# Local
/opt/odoo17/odoo17-venv/bin/python3 /opt/odoo17/odoo17/odoo-bin \
-c /etc/odoo17.conf -d test1 -u sr_module_name --stop-after-init
# Check for errors in the output before restarting
sudo systemctl restart odoo17
Troubleshooting¶
| Problem | Solution |
|---|---|
| Module doesn't appear in Apps | Run "Update Apps List" from the Apps menu. Check that the module directory is in addons_path. |
| JS component doesn't render | Check browser console for errors. Verify assets are registered in __manifest__.py. Try the manual asset registration workaround. |
| Fields missing from views | Run -u module_name to apply schema changes. Check that the field is defined in the model Python file. |
| "Access Denied" on a model | Add or fix ir.model.access.csv. Check record rules. |
| Changes not showing after restart | Clear browser cache (Ctrl+Shift+R). For JS changes, also clear Odoo asset cache. |
--stop-after-init hangs |
Check for infinite loops in init or post_init hooks. Check cron jobs that auto-run. |
| Database migration errors | Check _auto on models. If renaming fields, add a migration script in migrations/. |
| OWL template not found | Verify the template name in XML matches static template = "..." in JS exactly. |