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.

99 lines
4.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!--
  4. Copyright 2018 Eficent <https://www.eficent.com>
  5. License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  6. -->
  7. <record id="mail_activity_view_form_popup" model="ir.ui.view">
  8. <field name="name">mail.activity.view.form.popup</field>
  9. <field name="model">mail.activity</field>
  10. <field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
  11. <field name="priority">20</field>
  12. <field name="arch" type="xml">
  13. <field name="activity_type_id" position="after">
  14. <field name="state"/>
  15. <field name="date_done"/>
  16. </field>
  17. <button name="action_done" position="attributes">
  18. <attribute name="attrs">{'invisible':[('state', '=', 'done')]}</attribute>
  19. </button>
  20. </field>
  21. </record>
  22. <record id="mail_activity_view_search" model="ir.ui.view">
  23. <field name="name">mail.activity.view.search</field>
  24. <field name="model">mail.activity</field>
  25. <field name="inherit_id" ref="mail.mail_activity_view_search"/>
  26. <field name="arch" type="xml">
  27. <field name="res_model_id" position="after">
  28. <field name="done"/>
  29. <field name="active"/>
  30. <filter string="Completed Activities" name="activities_completed"
  31. domain="[('active', '=', False), ('state', '=', 'done')]"/>
  32. </field>
  33. <filter name="activities_overdue" position="attributes">
  34. <attribute name="domain">[('date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]</attribute>
  35. </filter>
  36. <filter name="activities_today" position="attributes">
  37. <attribute name="domain">[('date_deadline', '=', context_today().strftime('%Y-%m-%d'))]</attribute>
  38. </filter>
  39. <filter name="activities_upcoming_all" position="attributes">
  40. <attribute name="domain">[('date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))]</attribute>
  41. </filter>
  42. </field>
  43. </record>
  44. <record id="res_partner_view_search_inherit_mail" model="ir.ui.view">
  45. <field name="name">res.partner.view.search.inherit.mail</field>
  46. <field name="model">res.partner</field>
  47. <field name="inherit_id" ref="mail.res_partner_view_search_inherit_mail"/>
  48. <field name="arch" type="xml">
  49. <filter name="activities_my" position="after">
  50. <filter string="Open Activities" name="activities_open"
  51. domain="[('activity_ids.active', '=', True)]"/>
  52. <filter string="Completed Activities" name="activities_completed"
  53. domain="[('activity_ids.active', '=', False), ('activity_ids.state', '=', 'done')]"/>
  54. </filter>
  55. <filter name="activities_overdue" position="attributes">
  56. <attribute name="domain">[('activity_ids.date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]</attribute>
  57. </filter>
  58. <filter name="activities_today" position="attributes">
  59. <attribute name="domain">[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]</attribute>
  60. </filter>
  61. <filter name="activities_upcoming_all" position="attributes">
  62. <attribute name="domain">[('activity_ids.date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))]</attribute>
  63. </filter>
  64. </field>
  65. </record>
  66. <record id="mail_activity_view_tree" model="ir.ui.view">
  67. <field name="name">mail.activity.view.tree</field>
  68. <field name="model">mail.activity</field>
  69. <field name="inherit_id" ref="mail.mail_activity_view_tree"/>
  70. <field name="arch" type="xml">
  71. <field name="date_deadline" position="after">
  72. <field name="state"/>
  73. <field name="date_done"/>
  74. </field>
  75. <tree position="attributes">
  76. <attribute name="decoration-muted">state == 'done'</attribute>
  77. <attribute name="decoration-danger">date_deadline &lt; current_date and state != 'done'</attribute>
  78. <attribute name="decoration-success">date_deadline == current_date and state != 'done'</attribute>
  79. </tree>
  80. </field>
  81. </record>
  82. <record id="mail_activity_view_calendar" model="ir.ui.view">
  83. <field name="name">mail.activity.view.calendar</field>
  84. <field name="model">mail.activity</field>
  85. <field name="inherit_id" ref="mail.mail_activity_view_calendar"/>
  86. <field name="priority" eval="2"/>
  87. <field name="arch" type="xml">
  88. <field name="summary" position="after">
  89. <field name="state"/>
  90. <field name="date_done"/>
  91. </field>
  92. </field>
  93. </record>
  94. </odoo>