project.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="new_project_view" model="ir.ui.view">
  5. <field name="name">project.project</field>
  6. <field name="model">project.project</field>
  7. <field name="inherit_id" ref="project.edit_project"/>
  8. <field name="arch" type="xml">
  9. <xpath expr="//form[@string='Project']" position="replace" >
  10. <form string="Projects">
  11. <header>
  12. <button name="set_open" string="Re-open project" type="object" states="pending" class="oe_highlight" groups="base.group_user"/>
  13. <button name="set_done" string="Close Project" type="object" states="open,pending" groups="base.group_user"/>
  14. <button name="set_open" string="Re-open project" type="object" states="cancelled,close" groups="base.group_user"/>
  15. <button name="set_pending" string="Pending" type="object" states="open" groups="base.group_user"/>
  16. <button name="set_cancel" string="Cancel Project" type="object" states="open,pending" groups="base.group_user"/>
  17. <field name="state" widget="statusbar" statusbar_visible="open,close" statusbar_colors='{"pending":"blue"}' readonly="1"/>
  18. </header>
  19. <sheet string="Project">
  20. <div class="oe_title">
  21. <label for="name" class="oe_edit_only" string="Project Name"/>
  22. <h1>
  23. <field name="name" string="Project Name"/>
  24. </h1>
  25. <div name="options_active">
  26. <field name="use_tasks" class="oe_inline"/>
  27. <label for="use_tasks" string="Use Tasks"/>
  28. </div>
  29. </div>
  30. <field name="activity_ids" invisible="1"/>
  31. <div class="oe_right oe_button_box" name="buttons" groups="base.group_user">
  32. <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"
  33. name="%(project.act_project_project_2_project_task_all)d" icon="fa-tasks">
  34. <field string="Tasks" name="task_count" widget="statinfo"/>
  35. </button>
  36. <button class="oe_inline oe_stat_button" name="attachment_tree_view" type="object" icon="fa-files-o">
  37. <field string="Documents" name="doc_count" widget="statinfo"/>
  38. </button>
  39. <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('activity_ids','=', [])]}" name="%(custom_project.action_activity)d"
  40. context="{'search_default_project_id': active_id,'search_default_group_task_id': 1}">
  41. <field string="Activities" name="progress_activities" widget="percentpie"/>
  42. </button>
  43. </div>
  44. <group>
  45. <group col="4">
  46. <field name="user_id" string="Project Manager"
  47. attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"
  48. context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_manager']}"/>
  49. <newline/>
  50. </group>
  51. <!-- <p attrs="{'invisible': [('analytic_account_id','=',False)]}">
  52. To invoice or setup invoicing and renewal options, go to the related contract:
  53. <field name="analytic_account_id" readonly="1" required="0" class="oe_inline" nolabel="1"/>.
  54. </p> -->
  55. </group>
  56. <notebook>
  57. <page string="Team" name="team">
  58. <field colspan="4" name="members" widget="many2many_kanban" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}">
  59. <kanban quick_create="false" create="true" delete="true">
  60. <field name="name"/>
  61. <templates>
  62. <t t-name="kanban-box">
  63. <div style="position: relative">
  64. <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
  65. <div class="oe_module_vignette">
  66. <img t-att-src="kanban_image('res.users', 'image_small', record.id.value)" class="oe_avatar oe_kanban_avatar_smallbox"/>
  67. <div class="oe_module_desc">
  68. <field name="name"/>
  69. </div>
  70. </div>
  71. </div>
  72. </t>
  73. </templates>
  74. </kanban>
  75. </field>
  76. </page>
  77. <page string="Other Info">
  78. <group string="Miscellaneous" name="misc">
  79. <field name="date_start" string="Start Date"/>
  80. <field name="date" string="End Date"/>
  81. <field name="sequence" groups="base.group_no_one"/>
  82. <field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/>
  83. </group>
  84. </page>
  85. <page string="Project Stages" attrs="{'invisible': [('use_tasks', '=', False)]}" name="project_stages">
  86. <field name="type_ids"/>
  87. </page>
  88. </notebook>
  89. </sheet>
  90. </form>
  91. </xpath>
  92. </field>
  93. </record>
  94. <record id="view_project_kanban" model="ir.ui.view">
  95. <field name="name">project.kanban</field>
  96. <field name="model">project.project</field>
  97. <field name="inherit_id" ref="project.view_project_kanban"/>
  98. <field name="arch" type="xml">
  99. <field name="doc_count" position="after">
  100. <field name="progress_activities"/>
  101. <field name="activity_ids" invisible="1"/>
  102. </field>
  103. <div class="text-center oe_kanban_alias" position="after">
  104. <div class="oe_kanban_project" style="width:130px; height: 80px; margin: 0 auto; min-height: 80px;" attrs="{'invisible':[('activity_ids', '=', [])]}">
  105. <field name="progress_activities" widget="gauge" />
  106. </div>
  107. </div>
  108. </field>
  109. </record>
  110. </data>
  111. </openerp>