fault_record.xml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <openerp>
  2. <data>
  3. <record model="ir.ui.view" id="jc_device_fault_record_list">
  4. <field name="name">故障记录列表</field>
  5. <field name="model">jc_device.fault_record</field>
  6. <field name="arch" type="xml">
  7. <tree>
  8. <field name="id"/>
  9. <field name="name"/>
  10. <field name="auxiliary_name" invisible="1"/>
  11. <field name="bill_state"/>
  12. <field name="date"/>
  13. <field name="company_id"/>
  14. <field name="operation_department_id"/>
  15. <field name="repair_department_id"/>
  16. <field name="remark"/>
  17. </tree>
  18. </field>
  19. </record>
  20. <record model="ir.ui.view" id="jc_device_fault_record_edit">
  21. <field name="name">故障记录新建</field>
  22. <field name="model">jc_device.fault_record</field>
  23. <field name="arch" type="xml">
  24. <form>
  25. <style>
  26. .o_form_view .o_form_sheet_bg .o_form_sheet{
  27. max-width: 99%;
  28. }
  29. </style>
  30. <header>
  31. <field name="id" attrs="{'invisible': True}"/>
  32. <field name="can_check" attrs="{'invisible': True}"/>
  33. <field name="can_uncheck" attrs="{'invisible': True}"/>
  34. <field name="can_finish" attrs="{'invisible': True}"/>
  35. <field name="can_unfinish" attrs="{'invisible': True}"/>
  36. <field name="can_nullify" attrs="{'invisible': True}"/>
  37. <field name="can_un_nullify" attrs="{'invisible': True}"/>
  38. <field name="bill_state" readonly="1" attrs="{'invisible': 1}"/>
  39. </header>
  40. <sheet>
  41. <widget name="web_ribbon" title="已审核" bg_color="bg-success"
  42. attrs="{'invisible': [('bill_state', '!=', '10')]}"/>
  43. <widget name="web_ribbon" title="已完毕" bg_color="bg-primary"
  44. attrs="{'invisible': [('bill_state', '!=', '20')]}"/>
  45. <widget name="web_ribbon" title="已作废" bg_color="bg-danger"
  46. attrs="{'invisible': [('bill_state', '!=', '-1')]}"/>
  47. <group name="group_top" string="故障记录" col="8">
  48. <field name="date"/>
  49. <field name="company_id" options="{'no_open':True,'no_create':True}"/>
  50. <field name="operation_department_id" options="{'no_open':True,'no_create':True}"/>
  51. <field name="repair_department_id" options="{'no_open':True,'no_create':True}"/>
  52. </group>
  53. <notebook>
  54. <page string="故障记录明细">
  55. <field name="detail" mode="tree">
  56. <form string="故障记录明细">
  57. <group col="4">
  58. <field name="equipment_id" options="{'no_open':True,'no_create':True}"/>
  59. <field name="coding"/>
  60. <field name="equipment_area_id"
  61. options="{'no_open':True,'no_create':True}"/>
  62. <field name="fault_id" options="{'no_open':True,'no_create':True}"/>
  63. <field name="fault_level_id" options="{'no_open':True,'no_create':True}"/>
  64. <field name="fault_time"/>
  65. <field name="repaired_time"/>
  66. <field name="power_off_minutes"/>
  67. <field name="product_influence_minutes"/>
  68. <field name="remark"/>
  69. </group>
  70. </form>
  71. <tree string="故障记录明细" editable="bottom">
  72. <field name="equipment_id" options="{'no_open':True,'no_create':True}"/>
  73. <field name="coding"/>
  74. <field name="equipment_area_id" options="{'no_open':True,'no_create':True}"/>
  75. <field name="fault_id" options="{'no_open':True,'no_create':True}"/>
  76. <field name="fault_level_id" options="{'no_open':True,'no_create':True}"/>
  77. <field name="fault_time"/>
  78. <field name="repaired_time"/>
  79. <field name="power_off_minutes"/>
  80. <field name="product_influence_minutes"/>
  81. <field name="remark"/>
  82. </tree>
  83. </field>
  84. </page>
  85. </notebook>
  86. <group name="group_operator" col="4">
  87. <field name="create_uid" options="{'no_open':True,'no_create':True}"/>
  88. <field name="check_uid" options="{'no_open':True,'no_create':True}"/>
  89. </group>
  90. </sheet>
  91. </form>
  92. </field>
  93. </record>
  94. <record model="ir.ui.view" id="fault_record_search_view">
  95. <field name="name">故障记录.search</field>
  96. <field name="model">jc_device.fault_record</field>
  97. <field name="arch" type="xml">
  98. <search>
  99. <field name="name"/>
  100. <field name="remark"/>
  101. <filter name="not_checked_bill" string="未审核"
  102. domain="[('bill_state', '=', '1')]"/>
  103. <filter name="checked_bill" string="已审核"
  104. domain="[('bill_state', '=', '10')]"/>
  105. <filter name="finished_bill" string="已完毕"
  106. domain="[('bill_state', '=', '20')]"/>
  107. <group string="Group By">
  108. <filter name="by_bill_state" string="单据状态"
  109. context="{'group_by': 'bill_state'}"/>
  110. </group>
  111. </search>
  112. </field>
  113. </record>
  114. <record id="jc_device_fault_record_pivot" model="ir.ui.view">
  115. <field name="name">故障记录.pivot</field>
  116. <field name="model">jc_device.fault_record</field>
  117. <field name="arch" type="xml">
  118. <pivot>
  119. </pivot>
  120. </field>
  121. </record>
  122. <record id="fault_record_check_server" model="ir.actions.server">
  123. <field name="name">审核</field>
  124. <field name="model_id" ref="jc_device.model_jc_device_fault_record"/>
  125. <field name="binding_model_id" ref="jc_device.model_jc_device_fault_record"/>
  126. <field name="state">code</field>
  127. <!-- ALTER TABLE ir_act_server ALTER COLUMN activity_user_type DROP NOT NULL;-->
  128. <!-- <field name="activity_user_type">generic</field>-->
  129. <field name="code">
  130. records.batch_check()
  131. </field>
  132. </record>
  133. <record id="fault_record_un_check_server" model="ir.actions.server">
  134. <field name="name">撤销审核</field>
  135. <field name="model_id" ref="jc_device.model_jc_device_fault_record"/>
  136. <field name="binding_model_id" ref="jc_device.model_jc_device_fault_record"/>
  137. <field name="state">code</field>
  138. <!-- ALTER TABLE ir_act_server ALTER COLUMN activity_user_type DROP NOT NULL;-->
  139. <!-- <field name="activity_user_type">generic</field>-->
  140. <field name="code">
  141. records.batch_un_check()
  142. </field>
  143. </record>
  144. <record id="jc_device_fault_record_analyse" model="ir.ui.view">
  145. <field name="name">故障记录分析</field>
  146. <field name="model">jc_device.fault_record</field>
  147. <field name="arch" type="xml">
  148. <analyse detail_field="detail" reference_field="fault_record_id"/>
  149. </field>
  150. </record>
  151. <record model="ir.actions.act_window" id="jc_device_fault_record_action_window">
  152. <field name="name">故障记录</field>
  153. <field name="res_model">jc_device.fault_record</field>
  154. <field name="view_mode">tree,form,pivot,analyse</field>
  155. </record>
  156. <menuitem name="故障记录" id="jc_device.menu_fault_record" parent="jc_device_menu_root"
  157. action="jc_device_fault_record_action_window" sequence="6"/>
  158. </data>
  159. </openerp>