worksheet_views.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <openerp>
  2. <data>
  3. <record id="ir_cron_scheduler_demo_action" model="ir.cron">
  4. <field name="name">Demo scheduler</field>
  5. <field name="user_id" ref="base.user_root"/>
  6. <field name="interval_number">1</field>
  7. <field name="interval_type">minutes</field>
  8. <field name="numbercall">-1</field>
  9. <field eval="False" name="doall"/>
  10. <field eval="'car.workshop'" name="model"/>
  11. <field eval="'process_demo_scheduler_queue'" name="function"/>
  12. </record>
  13. <record model="ir.ui.view" id="worksheet_form_view">
  14. <field name="name">worksheet.form.view</field>
  15. <field name="model">car.workshop</field>
  16. <field name="arch" type="xml">
  17. <form string="Worksheet">
  18. <header>
  19. <button name="workshop_create_invoices" string="Crear Factura" type="object"
  20. class="btn-primary" states="waiting"/>
  21. <button class="btn-primary" name="cancel" string="Cancelar" type="object" states="waiting"/>
  22. <field name="stage_id" widget="statusbar" clickable="True"/>
  23. <field name="state" widget="statusbar" invisible="1"/>
  24. </header>
  25. <sheet string="Hoja de Tarea">
  26. <field name="kanban_state" widget="kanban_state_selection" invisible="1"/>
  27. <div class="oe_title">
  28. <h1 class="o_row">
  29. <field name="name" placeholder="Titulo de la tarea"/>
  30. </h1>
  31. </div>
  32. <group>
  33. <group>
  34. <field name="vehicle_id" string="Vehiculo" required="1" attrs="{'readonly': [('state','!=','waiting')]}"/>
  35. <field name="user_id" string="Responsable" required="1"/>
  36. </group>
  37. <group>
  38. <field name="date_deadline" string="Fecha limite entrega"/>
  39. <field name="tag_ids" widget="many2many_tags" string="Etiquetas"/>
  40. <field name="progress" widget="progressbar" />
  41. </group>
  42. </group>
  43. <notebook>
  44. <page name="description_page" string="Descripción">
  45. <field name="description" type="html"/>
  46. <div class="oe_clear"/>
  47. </page>
  48. <page name="timesheet_page" string="Hoja de trabajo">
  49. <group string ="Trabajo Planeado">
  50. <field name="planned_works" nolabel="1">
  51. <tree string="Planned Work" editable="bottom">
  52. <field name="planned_work" string="Trabajo"/>
  53. <field name="time_spent" sum= "Estimated Time" widget="float_time" string="Tiempo Estimado"/>
  54. <field name="work_date" string="Fecha de trabajo"/>
  55. <field name="responsible" string="Responsable"/>
  56. <field name="work_cost" string="Precio"/>
  57. <field name="completed" string="¿El trabajo esta terminado?"/>
  58. </tree>
  59. </field>
  60. </group>
  61. <group string = "Trabajos terminados">
  62. <field name="works_done" nolabel="1">
  63. <tree string="Planned Work" editable="bottom">
  64. <field name="planned_work" string="Trabajo"/>
  65. <field name="duration" sum= "Estimated Time" widget="float_time" string="Duracion"/>
  66. <field name="work_date2" string="Fecha de trabajo"/>
  67. <field name="responsible" string="Responsable"/>
  68. <field name="work_cost" string="Precio"/>
  69. </tree>
  70. </field>
  71. </group>
  72. <group string = "Materiales Utilizados">
  73. <field name="materials_used" nolabel="1"/>
  74. </group>
  75. <group>
  76. <field name="amount_total" string="Monto Total"/>
  77. </group>
  78. <group class="oe_subtotal_footer oe_right" name="project_hours">
  79. <field name="effective_hour" widget="float_time" string="Horas Gastadas"/>
  80. <field name ="remaining_hour" class="oe_subtotal_footer_separator" widget="float_time" string="Horas Restantes"/>
  81. </group>
  82. </page>
  83. <page string="Informacion Extra">
  84. <group col="4">
  85. <group col="2">
  86. <field name="partner_id" string="Cliente" required="1"/>
  87. <field name="company_id" string="Empresa" required="1"/>
  88. </group>
  89. <group col="2">
  90. <field name="date_assign" string="Fecha de creación"/>
  91. <field name="date_last_stage_update" string="Fecha de cambio de etapa"/>
  92. </group>
  93. </group>
  94. </page>
  95. </notebook>
  96. </sheet>
  97. </form>
  98. </field>
  99. </record>
  100. <record model="ir.ui.view" id="worksheet_tree_view">
  101. <field name="name">worksheet.tree.view</field>
  102. <field name="model">car.workshop</field>
  103. <field name="arch" type="xml">
  104. <tree string="Hoja de Trabajo">
  105. <field name="name"/>
  106. <field name="vehicle_id" invisible="context.get('user_invisible', False)"/>
  107. <field name="user_id" invisible="context.get('user_invisible', False)"/>
  108. <field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
  109. <field name="amount_total"/>
  110. <field name="stage_id" invisible="context.get('set_visible',False)"/>
  111. </tree>
  112. </field>
  113. </record>
  114. <record model="ir.ui.view" id="car_workshop_view_kanban">
  115. <field name="name">car.workshop.kanban</field>
  116. <field name="model">car.workshop</field>
  117. <field name="arch" type="xml">
  118. <kanban default_group_by="stage_id" class="o_kanban_small_column">
  119. <field name="color"/>
  120. <field name="priority"/>
  121. <field name="stage_id" options='{"group_by_tooltip": {"description": "Stage Description", "legend_priority": "Use of stars"}}'/>
  122. <field name="user_id"/>
  123. <field name="description"/>
  124. <field name="sequence"/>
  125. <field name="date_deadline"/>
  126. <field name="tag_ids"/>
  127. <field name="attachment_ids"/>
  128. <field name="active"/>
  129. <templates>
  130. <t t-name="kanban-box">
  131. <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
  132. <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
  133. <span class="oe_e">í</span>
  134. <ul class="oe_dropdown_menu">
  135. <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
  136. <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
  137. <li>
  138. <ul class="oe_kanban_project_times" groups="project.group_time_work_estimation_tasks">
  139. <li><a name="set_remaining_time_1" type="object" class="oe_kanban_button">1</a></li>
  140. <li><a name="set_remaining_time_2" type="object" class="oe_kanban_button">2</a></li>
  141. <li><a name="set_remaining_time_5" type="object" class="oe_kanban_button">5</a></li>
  142. <li><a name="set_remaining_time_10" type="object" class="oe_kanban_button">10</a></li>
  143. </ul>
  144. </li>
  145. <br/>
  146. <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
  147. </ul>
  148. </div>
  149. <div class="oe_kanban_content">
  150. <div><b><field name="name"/></b></div>
  151. <div>
  152. <field name="vehicle_id"/><br/>
  153. <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
  154. <span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span>
  155. </div>
  156. <div class="oe_kanban_bottom_right">
  157. <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
  158. </div>
  159. </div>
  160. <div class="oe_clear"></div>
  161. </div>
  162. </t>
  163. </templates>
  164. </kanban>
  165. </field>
  166. </record>
  167. <record id="worksheet_calender_view" model="ir.ui.view">
  168. <field name="name">worksheet.calender.view</field>
  169. <field name="model">car.workshop</field>
  170. <field eval="2" name="priority"/>
  171. <field name="arch" type="xml">
  172. <calendar color="user_id" date_start="date_deadline" string="Tasks">
  173. <field name="name"/>
  174. <field name="vehicle_id"/>
  175. </calendar>
  176. </field>
  177. </record>
  178. <record id="view_car_workshop_pivot" model="ir.ui.view">
  179. <field name="name">car.workshop.pivot</field>
  180. <field name="model">car.workshop</field>
  181. <field name="arch" type="xml">
  182. <graph string="Vehicles" type="pivot">
  183. <field name="vehicle_id" type="row"/>
  184. <field name="stage_id" type="col"/>
  185. </graph>
  186. </field>
  187. </record>
  188. <record id="view_car_workshop_graph" model="ir.ui.view">
  189. <field name="name">car.workshop.graph</field>
  190. <field name="model">car.workshop</field>
  191. <field name="arch" type="xml">
  192. <graph string="Project Tasks">
  193. <field name="vehicle_id"/>
  194. <field name="stage_id"/>
  195. </graph>
  196. </field>
  197. </record>
  198. <record model="ir.actions.act_window" id="worksheet_action_super_button">
  199. <field name="name">Hoja de Trabajo</field>
  200. <field name="res_model">car.workshop</field>
  201. <field name="context">{'search_default_vehicle_id': active_id}</field>
  202. <field name="view_mode">kanban,tree,form,calendar,graph</field>
  203. </record>
  204. <record id="view_vehicle_search_form" model="ir.ui.view">
  205. <field name="name">car.workshop.search.form</field>
  206. <field name="model">car.workshop</field>
  207. <field name="arch" type="xml">
  208. <search string="Worksheet">
  209. <field name="name" string="Tasks"/>
  210. <field name="tag_ids"/>
  211. <field name="partner_id"/>
  212. <field name="vehicle_id"/>
  213. <field name="user_id"/>
  214. <field name="stage_id"/>
  215. <filter string="Mi hoja de trabajo" domain="[('user_id','=',uid)]"/>
  216. <separator/>
  217. <filter string="Nuevo" name="draft" domain="[('stage_id.sequence', '&lt;=', 1)]"/>
  218. <separator/>
  219. <filter string="Archivados" name="inactive" domain="[('active','=',False)]"/>
  220. <group expand="0" string="Agrupar por ">
  221. <filter string="Vehiculo" name="vehicle" context="{'group_by':'vehicle_id'}"/>
  222. <filter string="Hoja de trabajo" context="{'group_by':'name'}"/>
  223. <filter string="Asignado a" name="User" context="{'group_by':'user_id'}"/>
  224. <filter string="Etapa" name="Stage" context="{'group_by':'stage_id'}"/>
  225. <separator/>
  226. </group>
  227. </search>
  228. </field>
  229. </record>
  230. <record model="ir.actions.act_window" id="action_car_workshop_filtered">
  231. <field name="name">Hoja de tareas</field>
  232. <field name="res_model">car.workshop</field>
  233. <field name="view_mode">kanban,tree,form,calendar</field>
  234. </record>
  235. <menuitem id="main_workshop_menu" name="Car Workshop" />
  236. <menuitem name="Buscar" id="search_worksheet" parent="main_workshop_menu" sequence="2"/>
  237. <menuitem name="Lista de tareas" id="vehicle_works" parent="search_worksheet" action="action_car_workshop_filtered"/>
  238. <menuitem id="menu_worksheet_config" name="Configuration" parent="main_workshop_menu" sequence="4"/>
  239. </data>
  240. </openerp>