113 lines
5.4 KiB
XML
113 lines
5.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- ============================================================ -->
|
|
<!-- Notification Log — List -->
|
|
<!-- ============================================================ -->
|
|
<record id="view_fp_notification_log_list" model="ir.ui.view">
|
|
<field name="name">fp.notification.log.list</field>
|
|
<field name="model">fp.notification.log</field>
|
|
<field name="arch" type="xml">
|
|
<list default_order="sent_date desc">
|
|
<field name="sent_date"/>
|
|
<field name="trigger_event"/>
|
|
<field name="partner_id" string="Customer"/>
|
|
<field name="recipient_email"/>
|
|
<field name="status" widget="badge"
|
|
decoration-success="status == 'sent'"
|
|
decoration-danger="status == 'failed'"/>
|
|
<field name="template_id"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ============================================================ -->
|
|
<!-- Notification Log — Form -->
|
|
<!-- ============================================================ -->
|
|
<record id="view_fp_notification_log_form" model="ir.ui.view">
|
|
<field name="name">fp.notification.log.form</field>
|
|
<field name="model">fp.notification.log</field>
|
|
<field name="arch" type="xml">
|
|
<form edit="0">
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="sent_date"/>
|
|
<field name="trigger_event"/>
|
|
<field name="template_id"/>
|
|
<field name="status" widget="badge"
|
|
decoration-success="status == 'sent'"
|
|
decoration-danger="status == 'failed'"/>
|
|
</group>
|
|
<group>
|
|
<field name="partner_id" string="Customer"/>
|
|
<field name="recipient_email"/>
|
|
<field name="sale_order_id"/>
|
|
<field name="mail_mail_id"/>
|
|
</group>
|
|
</group>
|
|
<group string="Attachments" invisible="not attachment_names">
|
|
<field name="attachment_names" nolabel="1" colspan="2"/>
|
|
</group>
|
|
<group string="Error Details" invisible="status != 'failed'">
|
|
<field name="error_message" nolabel="1" colspan="2"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ============================================================ -->
|
|
<!-- Notification Log — Search -->
|
|
<!-- ============================================================ -->
|
|
<record id="view_fp_notification_log_search" model="ir.ui.view">
|
|
<field name="name">fp.notification.log.search</field>
|
|
<field name="model">fp.notification.log</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="partner_id" string="Customer"/>
|
|
<field name="trigger_event"/>
|
|
<separator/>
|
|
<filter name="filter_sent" string="Sent"
|
|
domain="[('status', '=', 'sent')]"/>
|
|
<filter name="filter_failed" string="Failed"
|
|
domain="[('status', '=', 'failed')]"/>
|
|
<separator/>
|
|
<filter name="filter_today" string="Today"
|
|
domain="[('sent_date', '>=', (context_today()).strftime('%Y-%m-%d'))]"/>
|
|
<filter name="filter_this_week" string="This Week"
|
|
domain="[('sent_date', '>=', (context_today() - datetime.timedelta(days=context_today().weekday())).strftime('%Y-%m-%d'))]"/>
|
|
<separator/>
|
|
<group expand="1">
|
|
<filter name="group_trigger" string="Trigger Event"
|
|
context="{'group_by': 'trigger_event'}"/>
|
|
<filter name="group_status" string="Status"
|
|
context="{'group_by': 'status'}"/>
|
|
<filter name="group_partner" string="Customer"
|
|
context="{'group_by': 'partner_id'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ============================================================ -->
|
|
<!-- Notification Log — Action -->
|
|
<!-- ============================================================ -->
|
|
<record id="action_fp_notification_log" model="ir.actions.act_window">
|
|
<field name="name">Notification Log</field>
|
|
<field name="res_model">fp.notification.log</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="search_view_id" ref="view_fp_notification_log_search"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No notifications sent yet
|
|
</p>
|
|
<p>
|
|
This log records every notification email sent by the system,
|
|
including failures for troubleshooting.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|