social/mail_activity_done/views/mail_activity_views.xml

101 lines
5.0 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--
Copyright 2018 Eficent <https://www.eficent.com>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->
<record id="mail_activity_view_form_popup" model="ir.ui.view">
<field name="name">mail.activity.view.form.popup</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
<field name="priority">20</field>
<field name="arch" type="xml">
<field name="activity_type_id" position="after">
<field name="state"/>
<field name="date_done"/>
</field>
<button name="action_done" position="attributes">
<attribute name="attrs">{'invisible':[('state', '=', 'done')]}</attribute>
</button>
</field>
</record>
<record id="mail_activity_view_search" model="ir.ui.view">
<field name="name">mail.activity.view.search</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_search"/>
<field name="arch" type="xml">
<field name="res_model_id" position="after">
<field name="done"/>
2019-05-07 17:24:53 +02:00
<filter string="Open Activities" name="activities_open"
domain="[('done', '!=', True)]"/>
2019-05-07 17:24:53 +02:00
<filter string="Completed Activities" name="activities_completed"
domain="[('done', '=', True)]"/>
</field>
<filter name="activities_overdue" position="attributes">
<attribute name="domain">[('date_deadline', '&lt;', context_today().strftime('%Y-%m-%d')), ('done', '!=', True)]</attribute>
</filter>
<filter name="activities_today" position="attributes">
<attribute name="domain">[('date_deadline', '=', context_today().strftime('%Y-%m-%d')), ('done', '!=', True)]</attribute>
</filter>
<filter name="activities_upcoming_all" position="attributes">
<attribute name="domain">[('date_deadline', '&gt;', context_today().strftime('%Y-%m-%d')), ('done', '!=', True)]</attribute>
</filter>
</field>
</record>
2019-05-07 17:24:53 +02:00
<record id="res_partner_view_search_inherit_mail" model="ir.ui.view">
<field name="name">res.partner.view.search.inherit.mail</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="mail.res_partner_view_search_inherit_mail"/>
<field name="arch" type="xml">
<filter name="activities_my" position="after">
<filter string="Open Activities" name="activities_open"
domain="[('activity_ids.done', '!=', True)]"/>
<filter string="Completed Activities" name="activities_completed"
domain="[('activity_ids.done', '=', True)]"/>
</filter>
<filter name="activities_overdue" position="attributes">
<attribute name="domain">[('activity_ids.date_deadline', '&lt;', context_today().strftime('%Y-%m-%d')), ('activity_ids.done', '!=', True)]</attribute>
</filter>
<filter name="activities_today" position="attributes">
<attribute name="domain">[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d')), ('activity_ids.done', '!=', True)]</attribute>
</filter>
<filter name="activities_upcoming_all" position="attributes">
<attribute name="domain">[('activity_ids.date_deadline', '&gt;', context_today().strftime('%Y-%m-%d')), ('activity_ids.done', '!=', True)]</attribute>
</filter>
</field>
</record>
<record id="mail_activity_view_tree" model="ir.ui.view">
<field name="name">mail.activity.view.tree</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_tree"/>
<field name="arch" type="xml">
<field name="date_deadline" position="after">
<field name="state"/>
<field name="date_done"/>
</field>
<tree position="attributes">
<attribute name="decoration-muted">state == 'done'</attribute>
<attribute name="decoration-danger">date_deadline &lt; current_date and state != 'done'</attribute>
<attribute name="decoration-success">date_deadline == current_date and state != 'done'</attribute>
</tree>
</field>
</record>
<record id="mail_activity_view_calendar" model="ir.ui.view">
<field name="name">mail.activity.view.calendar</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_calendar"/>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<field name="summary" position="after">
<field name="state"/>
<field name="date_done"/>
</field>
</field>
</record>
</odoo>