operation_record.xml 8.1 KB

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