project_service.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- actions -->
  5. <act_window
  6. id="action_open_project_service_task"
  7. name="Clientes"
  8. res_model="project.service.task"
  9. view_type="form"
  10. view_mode="tree,form"
  11. domain="[('project_id', '=', active_id)]"/>
  12. <act_window
  13. id="action_open_single_project_service_task"
  14. name="Clientes"
  15. res_model="project.service.task"
  16. view_type="form"
  17. view_mode="tree,form"
  18. target="current"
  19. domain="[('project_service_task_ids', 'in', active_id)]"/>
  20. <!-- Form view -->
  21. <record model="ir.ui.view" id="project_service_form">
  22. <field name="name">project.service.form</field>
  23. <field name="model">project.service</field>
  24. <field name="arch" type="xml">
  25. <form string="Proyectos">
  26. <sheet>
  27. <field name="image_medium" widget='image' class="oe_avatar oe_left"/>
  28. <div class="oe_title">
  29. <h1>
  30. <field name="name"/>
  31. </h1>
  32. </div>
  33. <div class="oe_right oe_button_box">
  34. <button
  35. class="oe_inline oe_stat_button"
  36. type="action"
  37. name="%(action_open_project_service_task)d"
  38. icon="far fa-user">
  39. <field name="project_service_task_count" string="Clientes" widget="statinfo" />
  40. </button>
  41. </div>
  42. <notebook>
  43. <page string="Configuración">
  44. <group>
  45. <group>
  46. <field name="active"/>
  47. </group>
  48. <group>
  49. </group>
  50. </group>
  51. </page>
  52. </notebook>
  53. </sheet>
  54. </form>
  55. </field>
  56. </record>
  57. <!-- Kanban view -->
  58. <record model="ir.ui.view" id="project_service_kanban">
  59. <field name="name">project.service.kanban</field>
  60. <field name="model">project.service</field>
  61. <field name="arch" type="xml">
  62. <kanban class="oe_background_grey">
  63. <field name="name"/>
  64. <field name="color"/>
  65. <field name="project_service_task_count"/>
  66. <field name="project_service_task_ids"/>
  67. <templates>
  68. <t t-name="kanban-box" class="project-card">
  69. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click project-card">
  70. <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
  71. <span class="oe_e">í</span>
  72. <ul class="oe_dropdown_menu">
  73. <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Configurar</a></li></t>
  74. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  75. </ul>
  76. </div>
  77. <div class="oe_kanban_content">
  78. <h4 class="text-center"><strong><field name="name"/></strong></h4>
  79. <div class="o_kanban_image text-center image_kanban_project card-image-box">
  80. <img t-att-src="kanban_image('project.service', 'image_medium', record.id.value)" style="width:80%;"/>
  81. </div>
  82. </div>
  83. <div class="oe_kanban_project_list">
  84. <div class="o_project_kanban_box">
  85. <a name="%(action_open_project_service_task)d" type="action" style="margin-right: 10px">
  86. <t t-raw="record.project_service_task_count.raw_value"/> Tareas
  87. </a>
  88. </div>
  89. </div>
  90. </div>
  91. </t>
  92. </templates>
  93. </kanban>
  94. </field>
  95. </record>
  96. <!-- tree view -->
  97. <record model="ir.ui.view" id="project_service_tree">
  98. <field name="name">project.service.tree</field>
  99. <field name="model">project.service</field>
  100. <field name="arch" type="xml">
  101. <tree string="Panel de control">
  102. <field name="name" string="Nombre"/>
  103. </tree>
  104. </field>
  105. </record>
  106. <!-- action -->
  107. <record model="ir.actions.act_window" id="project_service_action">
  108. <field name="name">Panel de control</field>
  109. <field name="res_model">project.service</field>
  110. <field name="view_type">form</field>
  111. <field name="domain">[]</field>
  112. <field name="view_mode">kanban,tree,form</field>
  113. </record>
  114. <!-- menus -->
  115. <menuitem id="project_main_menu" name="Salon e Spa"/>
  116. <menuitem name="Salon e Spa" parent="project_main_menu" id="project_service_parent_menu" sequence="1"/>
  117. <menuitem name="Panel de control" parent="project_service_parent_menu" id="project_service_all_menu" sequence="1" action="project_service_action"/>
  118. <menuitem name="Configuracion" parent="project_main_menu" id="project_config_parent_menu" sequence="5"/>
  119. </data>
  120. </openerp>