task.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_project_task_form" model="ir.ui.view">
  5. <field name="name">project.task.form</field>
  6. <field name="model">project.task</field>
  7. <field name="inherit_id" ref="project.view_task_form2"/>
  8. <field name="arch" type="xml">
  9. <xpath expr="//field[@name='partner_id']" position="replace">
  10. <field name="partner_id" invisible="1"/>
  11. </xpath>
  12. <xpath expr="//field[@name='date_last_stage_update']" position="replace">
  13. <field name="date_last_stage_update" string="Última actualización de la etapa" readonly="1"/>
  14. </xpath>
  15. <field name="work_ids" position="before">
  16. <label for="activity_ids" string="Activities"/>
  17. <field name="activity_ids">
  18. <tree editable="top" colors="gray:state == 'cancel';blue:state == 'pending'">
  19. <field name="sequence" widget="handle"/>
  20. <field name="name"/>
  21. <field name="user_id" required="True"/>
  22. <field name="planned_date"/>
  23. <field name="done_date"/>
  24. <field name="state"/>
  25. <field name="hex_value" invisible="1"/>
  26. <button name="action_done" string="Done" type="object" icon="gtk-go-forward" help="Done" attrs="{'invisible':[('state','!=','pending'),('state','!=','cancel')]}"/>
  27. <button name="action_done" string="Pending" type="object" icon="gtk-go-back" help="Pending" attrs="{'invisible':[('state','!=','done')]}"/>
  28. <button name="action_cancel" string="Cancel" type="object" icon="gtk-cancel" help="Cancel" attrs="{'invisible':[('state','=','cancel')]}"/>
  29. <field name="description"/>
  30. </tree>
  31. </field>
  32. </field>
  33. </field>
  34. </record>
  35. <record id="view_project_task_kanban" model="ir.ui.view">
  36. <field name="name">project.task.kanban</field>
  37. <field name="model">project.task</field>
  38. <field name="inherit_id" ref="project.view_task_kanban"/>
  39. <field name="arch" type="xml">
  40. <field name="categ_ids" position="after">
  41. <field name="activities_progress"/>
  42. <field name="activity_ids" invisible="1"/>
  43. </field>
  44. <xpath expr="//div[@class='pull-left']" position="before">
  45. <div class="pull-left" groups="base.group_user">
  46. <field name="activities_progress" attrs="{'invisible':[('activity_ids', '=', [])]}" widget="sparkline_bar"/>
  47. </div>
  48. </xpath>
  49. <xpath expr="//ul[@class='oe_dropdown_menu']" position="replace">
  50. <ul class="oe_dropdown_menu">
  51. <t t-if="widget.view.is_action_enabled('edit')">
  52. <li>
  53. <a type="edit">Edit...</a>
  54. </li>
  55. </t>
  56. <t t-if="widget.view.is_action_enabled('delete')">
  57. <li>
  58. <a type="delete">Delete</a>
  59. </li>
  60. </t>
  61. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  62. </ul>
  63. </xpath>
  64. <xpath expr="//field[@name='categ_ids']" position="attributes">
  65. <attribute name="widget">many2many_tags</attribute>
  66. </xpath>
  67. </field>
  68. </record>
  69. </data>
  70. </openerp>