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.

76 lines
3.5 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="mail_activity_view_tree" model="ir.ui.view">
  45. <field name="name">mail.activity.view.tree</field>
  46. <field name="model">mail.activity</field>
  47. <field name="inherit_id" ref="mail.mail_activity_view_tree"/>
  48. <field name="arch" type="xml">
  49. <field name="date_deadline" position="after">
  50. <field name="state"/>
  51. <field name="date_done"/>
  52. </field>
  53. <tree position="attributes">
  54. <attribute name="decoration-muted">state == 'done'</attribute>
  55. <attribute name="decoration-danger">date_deadline &lt; current_date and state != 'done'</attribute>
  56. <attribute name="decoration-success">date_deadline == current_date and state != 'done'</attribute>
  57. </tree>
  58. </field>
  59. </record>
  60. <record id="mail_activity_view_calendar" model="ir.ui.view">
  61. <field name="name">mail.activity.view.calendar</field>
  62. <field name="model">mail.activity</field>
  63. <field name="inherit_id" ref="mail.mail_activity_view_calendar"/>
  64. <field name="priority" eval="2"/>
  65. <field name="arch" type="xml">
  66. <field name="summary" position="after">
  67. <field name="state"/>
  68. <field name="date_done"/>
  69. </field>
  70. </field>
  71. </record>
  72. </odoo>