Files
Janik von Rotz d1ccc398eb feat(snippets): rename generation commands and standardize output file names
- Rename `generate-module-inherit` to `generate-module-inherit-model`
- Rename `generate-module-snippet` to `generate-module-inherit-view`
- Standardize output file names to `${MODEL_NAME}.xml` for views, inherit, and reports
- Update template file names: `model_views.xml` to `view.xml`, `model_snippet.xml` to `inherit.xml`, `model_templates.xml` to `template.xml`
- Update CHANGELOG with breaking changes regarding command and file name renames
2026-07-27 11:51:21 +02:00

32 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="timesheet_sale_page" inherit_id="sale_timesheet.timesheet_sale_page">
<xpath expr="//t[@t-call='hr_timesheet.timesheet_table']" position="after">
<div>Custom content after table</div>
</xpath>
</template>
<template id="report_$MODEL_NAME">
<t t-set="xyz" t-value="true"/>
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<h1>$MODEL_DESCRIPTION</h1>
<t t-foreach="docs" t-as="doc">
<p t-out="doc.name"/>
</t>
</div>
</t>
</t>
</template>
<record id="report_$MODEL_NAME" model="ir.actions.report">
<field name="name">$MODEL_DESCRIPTION</field>
<field name="model">$MODEL_DOT_NAME</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">$MODULE_NAME.report_$MODEL_NAME</field>
<field name="binding_model_id" ref="model_$MODEL_NAME"/>
</record>
</odoo>