Safely customize Odoo 17 core views (XML/QWeb) and core JS behavior using inheritance/patching only. Never edits core files. Avoids collisions by using unique xml_ids, robust xpath, unique patch keys/module names, and validating assets. Designed to minimize conflicts with other modules.
Achieve the desired UI/behavior changes by inheriting/patching core Odoo 17 views or JS, while:
view_xml, qweb, or jssale.view_order_form)If missing: infer safe defaults and list assumptions in summary.
./odoo17).<module>_inh_<slug>_<purpose><record model="ir.ui.view"> with:
<field name="inherit_id" ref="<base_view_xmlid>"/>//field[@name='x'], //group[hasclass('...')], //page[@name='...']t-inherit="..." and xpath inside template.t-name of core templates.patch() on an imported prototype/class or use registry extension patterns.super/original behavior where appropriate"<module>.<slug>"You MUST search the workspace for:
inherit_idFILE: path then full final contentscripts/scan_targets.sh — search base view/template/js in workspace + ./odoo17scripts/check_xmlid_collisions.sh — verify no xml_id collisionsscripts/validate_xml.sh — xmllint well-formed checkscripts/validate_js.sh — node --check syntaxscripts/scan_js_patches.sh — search existing patches on same module/patterntemplates/view_inherit.xml.j2 — standard inherit viewtemplates/qweb_inherit.xml.j2 — t-inherit QWebtemplates/js_patch.js.j2 — minimal patch patterntemplates/manifest_assets_snippet.txt.j2 — assets bundle snippettemplates/provenance_marker.txt.j2 — provenance marker