-
-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Draft: [14.0][ADD] keep latest report record attachment
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
report_keep_latest_attachment/demo/report_keep_latest_attachment_demo.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<template id="report_keep_latest_attachment_demo_document"> | ||
<t t-call="web.external_layout"> | ||
<div class="page"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<span> | ||
This is a sample report for testing keeping of the | ||
latest PDF Report. | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</t> | ||
</template> | ||
<template id="report_keep_latest_attachment_demo"> | ||
<t t-call="web.html_container"> | ||
<t t-foreach="docs" t-as="o"> | ||
<t | ||
t-call="report_keep_latest_attachment.report_keep_latest_attachment_demo_document" | ||
t-lang="o.lang" | ||
/> | ||
</t> | ||
</t> | ||
</template> | ||
<record id="action_keep_latest_attachment_report" | ||
model="ir.actions.report"> | ||
<field name="name">Test PDF Latest Attachment</field> | ||
<field name="model">res.partner</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="report_name">report_keep_latest_attachment.report_keep_latest_attachment_demo</field> | ||
<field name="attachment">'%s.pdf' % object.name or ''</field> | ||
<field name="attachment_use">True</field> | ||
<field name="binding_model_id" ref="base.model_res_partner" /> | ||
<field name="binding_type">report</field> | ||
</record> | ||
|
||
|
||
</odoo> |