activity.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_project_task_activity_search" model="ir.ui.view">
  5. <field name="name">project.task_activity.search</field>
  6. <field name="model">project.task.activity</field>
  7. <field name="arch" type="xml">
  8. <search string="Activity">
  9. <field name="name"/>
  10. <field name="user_id"/>
  11. <field name="task_id"/>
  12. <field name="project_id"/>
  13. <field name="company_id"/>
  14. <field name="state"/>
  15. <filter string="Realizado" domain="[('state', '=', 'done')]"/>
  16. <filter string="Pendiente" domain="[('state', '=', 'pending')]"/>
  17. <filter string="Cancelado" domain="[('state', '=', 'cancel')]"/>
  18. <br/>
  19. <filter string="Creado hoy" domain="[('planned_date', '&gt;=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('planned_date', '&lt;=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
  20. <filter string="Finalizado hoy" domain="[('done_date', '&gt;=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('done_date', '&lt;=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
  21. <group expand="0" string="Group By..">
  22. <filter string="Project" help="Proyecto" context="{'group_by':'project_id'}"/>
  23. <filter string="Estado" help="Estado" context="{'group_by':'state'}"/>
  24. <filter string="Responsable" help="Responsable" context="{'group_by':'user_id'}"/>
  25. </group>
  26. </search>
  27. </field>
  28. </record>
  29. <record id="view_project_task_activity_form" model="ir.ui.view">
  30. <field name="name">project.task_activity.form</field>
  31. <field name="model">project.task.activity</field>
  32. <field name="arch" type="xml">
  33. <form>
  34. <group>
  35. <field name="name"/>
  36. <field name="user_id" required="True"/>
  37. <field name="planned_date"/>
  38. <field name="done_date"/>
  39. <field name="duration"/>
  40. </group>
  41. <group>
  42. <field name="task_id"/>
  43. <field name="project_id"/>
  44. <field name="company_id"/>
  45. <field name="state"/>
  46. <field name="description"/>
  47. </group>
  48. </form>
  49. </field>
  50. </record>
  51. <record id="view_project_task_activity_calendar" model="ir.ui.view">
  52. <field name="name">Calendario de Actividades</field>
  53. <field name="model">project.task.activity</field>
  54. <field eval="2" name="priority"/>
  55. <field name="arch" type="xml">
  56. <calendar color="user_id" date_start="planned_date" date_stop="done_date" string="Actividades" event_open_popup="%(view_project_task_activity_form)s">
  57. <field name="name"/>
  58. <field name="hex_value"/>
  59. </calendar>
  60. </field>
  61. </record>
  62. <record id="view_project_task_activity_tree" model="ir.ui.view">
  63. <field name="name">project.task_activity.tree</field>
  64. <field name="model">project.task.activity</field>
  65. <field name="arch" type="xml">
  66. <tree colors="gray:state == 'cancel';blue:state == 'pending'">
  67. <field name="name"/>
  68. <field name="user_id"/>
  69. <field name="planned_date"/>
  70. <field name="done_date"/>
  71. <field name="state"/>
  72. <field name="description"/>
  73. </tree>
  74. </field>
  75. </record>
  76. <record id="activity_calendar" model="ir.actions.act_window">
  77. <field name="name">Actividades</field>
  78. <field name="res_model">project.task.activity</field>
  79. <field name="view_mode">calendar,form,tree</field>
  80. <field name="view_id" ref="view_project_task_activity_calendar"/>
  81. <field name="help" type="html">
  82. <p class="oe_view_nocontent_create">
  83. Click to schedule a new meeting.
  84. </p>
  85. <p>
  86. The calendario is shared between employees and fully integrated with other applications such as the employee holidays or the business opportunities.
  87. </p>
  88. </field>
  89. </record>
  90. <record model="ir.actions.act_window.view" id="action_calendar_activity">
  91. <field name="act_window_id" ref="activity_calendar"/>
  92. <field name="sequence" eval="1"/>
  93. <field name="view_mode">calendar</field>
  94. <field name="view_id" ref="view_project_task_activity_calendar"/>
  95. </record>
  96. <record model="ir.actions.act_window.view" id="action_calendar_form">
  97. <field name="act_window_id" ref="activity_calendar"/>
  98. <field name="sequence" eval="3"/>
  99. <field name="view_mode">form</field>
  100. <field name="view_id" ref="view_project_task_activity_form"/>
  101. </record>
  102. <record model="ir.actions.act_window.view" id="action_calendar_tree">
  103. <field name="act_window_id" ref="activity_calendar"/>
  104. <field name="sequence" eval="3"/>
  105. <field name="view_mode">tree</field>
  106. <field name="view_id" ref="view_project_task_activity_tree"/>
  107. </record>
  108. <menuitem name="Calendario de Actividades" id="mail_menu_calendario" parent="mail.mail_my_stuff" sequence="10" action="activity_calendar"/>
  109. </data>
  110. </openerp>