You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
2.6 KiB
50 lines
2.6 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!--Cron action failure pdf template-->
|
|
<template id="report_logs_details">
|
|
<t t-call="web.html_container">
|
|
<t t-call="web.external_layout">
|
|
<div class="page">
|
|
<center>
|
|
<h2>Cron Failure Report</h2>
|
|
</center>
|
|
<br/>
|
|
<br/>
|
|
<div class="oe_structure" style="">
|
|
<strong>
|
|
<p>Cron Action Name:</p>
|
|
</strong>
|
|
<table class="table table-sm">
|
|
<tr>
|
|
<th style="border: solid 1px black; text-align: center;">Cron Name</th>
|
|
<th style="border: solid 1px black; text-align: center;">Date and Time of Run</th>
|
|
<th style="border: solid 1px black; text-align: center;">Error Details</th>
|
|
</tr>
|
|
<t t-set="end_time"
|
|
t-value="datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')"/>
|
|
<t t-set="start_time"
|
|
t-value="(datetime.datetime.now() - datetime.timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
|
<t t-set="failure_record"
|
|
t-value="request.env['failure.history'].search([('create_date', '>=', start_time), ('create_date', '<=', end_time )])"/>
|
|
<t t-foreach="failure_record" t-as="history">
|
|
<tr>
|
|
<td style="border: solid 1px black; text-align: center;">
|
|
<span t-esc="history.name"/>
|
|
</td>
|
|
<td style="border: solid 1px black; text-align: center;">
|
|
<span t-esc="history.create_date"/>
|
|
</td>
|
|
<td style="color:#ea5252; border: solid 1px black; text-align: center;">
|
|
<h5>
|
|
<span t-esc="history.error"/>
|
|
</h5>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</odoo>
|
|
|