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.

77 lines
3.6 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. <filter string="Open Activities" name="activities_open"
  30. domain="[('done', '!=', True)]"/>
  31. <filter string="Completed Activities" name="activities_completed"
  32. domain="[('done', '=', True)]"/>
  33. </field>
  34. <filter name="activities_overdue" position="attributes">
  35. <attribute name="domain">[('date_deadline', '&lt;', context_today().strftime('%Y-%m-%d')), ('done', '!=', True)]</attribute>
  36. </filter>
  37. <filter name="activities_today" position="attributes">
  38. <attribute name="domain">[('date_deadline', '=', context_today().strftime('%Y-%m-%d')), ('done', '!=', True)]</attribute>
  39. </filter>
  40. <filter name="activities_upcoming_all" position="attributes">
  41. <attribute name="domain">[('date_deadline', '&gt;', context_today().strftime('%Y-%m-%d')), ('done', '!=', True)]</attribute>
  42. </filter>
  43. </field>
  44. </record>
  45. <record id="mail_activity_view_tree" model="ir.ui.view">
  46. <field name="name">mail.activity.view.tree</field>
  47. <field name="model">mail.activity</field>
  48. <field name="inherit_id" ref="mail.mail_activity_view_tree"/>
  49. <field name="arch" type="xml">
  50. <field name="date_deadline" position="after">
  51. <field name="state"/>
  52. <field name="date_done"/>
  53. </field>
  54. <tree position="attributes">
  55. <attribute name="decoration-muted">state == 'done'</attribute>
  56. <attribute name="decoration-danger">date_deadline &lt; current_date and state != 'done'</attribute>
  57. <attribute name="decoration-success">date_deadline == current_date and state != 'done'</attribute>
  58. </tree>
  59. </field>
  60. </record>
  61. <record id="mail_activity_view_calendar" model="ir.ui.view">
  62. <field name="name">mail.activity.view.calendar</field>
  63. <field name="model">mail.activity</field>
  64. <field name="inherit_id" ref="mail.mail_activity_view_calendar"/>
  65. <field name="priority" eval="2"/>
  66. <field name="arch" type="xml">
  67. <field name="summary" position="after">
  68. <field name="state"/>
  69. <field name="date_done"/>
  70. </field>
  71. </field>
  72. </record>
  73. </odoo>