project.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <record id="project_car_form_view" model="ir.ui.view">
  5. <field name="name">project.car.form.view</field>
  6. <field name="model">car.car</field>
  7. <field name="inherit_id" ref="eiru_base_for_services.car_car_form"/>
  8. <field name="arch" type="xml">
  9. <group name="extra_info" position="inside">
  10. <field name="date_in" string="Fecha de entrada" attrs="{'required': [('state','!=', 'draft')],'readonly': [('state','=', 'close')]}"/>
  11. <field name="date_out" string="Fecha de salida" attrs="{'readonly': [('state','=', 'close')]}"/>
  12. </group>
  13. <field name="name" position="replace">
  14. <field name="name" placeholder="Vehiculo" attrs="{'readonly': [('state','=', 'close')]}"/>
  15. </field>
  16. <field name="partner_id" position="before">
  17. <field name="policy" string="¿Entra por medio de seguro?" attrs="{'readonly': [('state','=', 'close')]}"/>
  18. </field>
  19. <field name="partner_id" position="after">
  20. <field name="agent_id" string="Agente de seguro" attrs="{'invisible': [('policy','=', False)],'readonly': [('state','=', 'close')]}"/>
  21. </field>
  22. </field>
  23. </record>
  24. <record id="planned_works_tree" model="ir.ui.view">
  25. <field name="name">planned.works.tree</field>
  26. <field name="model">planned.work</field>
  27. <field name="arch" type="xml">
  28. <tree string="tareas">
  29. <field name="responsible" string="Responsable"/>
  30. <field name="work_id" string="Trabajo"/>
  31. <field name="planned_work" string="Actividad"/>
  32. <field name="work_date" string="Fecha"/>
  33. <field name="work_cost" string="Costo"/>
  34. <field name="completed" string="Estado"/>
  35. </tree>
  36. </field>
  37. </record>
  38. <record id="view_planned_work_filter" model="ir.ui.view">
  39. <field name="name">planned.work.filter</field>
  40. <field name="model">planned.work</field>
  41. <field name="arch" type="xml">
  42. <search string="Search Work">
  43. <field name="work_id" string="Tarea"/>
  44. <filter string="Terminados" name="completed" domain="[('completed', '=',True)]"/>
  45. <filter string="Pendientes" name="Pending" domain="[('completed', '=',False)]"/>
  46. <filter string="Hoy" domain="[('work_date', '&gt;=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('work_date', '&lt;=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
  47. <filter string="Ayer" domain="[('work_date','&lt;=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('work_date','&gt;=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
  48. <filter string="Esta semana" domain="[('work_date', '&gt;=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('work_date', '&lt;=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
  49. <filter string="Mes actual" domain="[('work_date','&lt;',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('work_date','&gt;=',time.strftime('%%Y-%%m-01'))]"/>
  50. <filter string="Mes pasado" domain="[('work_date','&gt;=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('work_date','&lt;',time.strftime('%%Y-%%m-01'))]"/>
  51. <separator/>
  52. <separator/>
  53. <group expand="0" string="Agrupar por ">
  54. <filter string="Responsale" name="responsible" context="{'group_by':'responsible'}"/>
  55. <filter string="Tarea" name="work_id" context="{'group_by':'work_id'}"/>
  56. </group>
  57. </search>
  58. </field>
  59. </record>
  60. <record id="planned_works_action" model="ir.actions.act_window">
  61. <field name="name">Todas las actividades</field>
  62. <field name="res_model">planned.work</field>
  63. <field name="view_mode">tree,form</field>
  64. </record>
  65. <record id="action_open_workshop_invoice" model="ir.actions.act_window">
  66. <field name="name">Facturas</field>
  67. <field name="res_model">account.invoice</field>
  68. <field name="domain">[('work_invoice_id','=',active_id)]</field>
  69. <field name="search_view_id" ref="account.view_account_invoice_filter" />
  70. </record>
  71. <record id="action_workshop_invoice_tree" model="ir.actions.act_window.view">
  72. <field name="sequence" eval="1"/>
  73. <field name="view_mode">tree</field>
  74. <field name="view_id" ref="account.invoice_tree"/>
  75. <field name="act_window_id" ref="action_open_workshop_invoice"/>
  76. </record>
  77. <record id="action_workshop_show_invoice_form" model="ir.actions.act_window.view">
  78. <field name="sequence" eval="2"/>
  79. <field name="view_mode">form</field>
  80. <field name="view_id" ref="account.invoice_form"/>
  81. <field name="act_window_id" ref="action_open_workshop_invoice"/>
  82. </record>
  83. <record id="view_invoice_workshop_form" model="ir.ui.view">
  84. <field name="name">car.brand.form</field>
  85. <field name="model">car.workshop</field>
  86. <field name="inherit_id" ref="eiru_base_for_services.worksheet_form_view"/>
  87. <field name="arch" type="xml">
  88. <field name="kanban_state" position="after">
  89. <div class="oe_right oe_button_box">
  90. <button
  91. class="oe_inline oe_stat_button"
  92. type="action"
  93. name="%(action_open_workshop_invoice)d"
  94. icon="fa-money">
  95. <field name="invoice_count" string="Facturas" widget="statinfo" />
  96. </button>
  97. </div>
  98. </field>
  99. </field>
  100. </record>
  101. <record id="view_car_workshop_form_draft" model="ir.ui.view">
  102. <field name="name">car.workshop.form.draft</field>
  103. <field name="model">car.workshop</field>
  104. <field name="inherit_id" ref="eiru_base_for_services.worksheet_form_view"/>
  105. <field name="arch" type="xml">
  106. <field name="stage_id" position="before">
  107. <button name="button_draft"
  108. states="cancel,workshop_create_invoices"
  109. string="Cambiar Estado"
  110. type="object"
  111. groups="base.group_no_one"/>
  112. </field>
  113. </field>
  114. </record>
  115. <menuitem name="Control de Actividades" parent="eiru_base_for_services.main_workshop_menu" id="planned_work_menu" sequence="3"/>
  116. <menuitem action="planned_works_action" id="menu_planned_works_action" parent="planned_work_menu"/>
  117. </data>
  118. </openerp>