123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <openerp>
- <data>
- <record model="ir.ui.view" id="jc_device_fault_record_list">
- <field name="name">故障记录列表</field>
- <field name="model">jc_device.fault_record</field>
- <field name="arch" type="xml">
- <tree>
- <field name="id"/>
- <field name="name"/>
- <field name="auxiliary_name" invisible="1"/>
- <field name="bill_state"/>
- <field name="date"/>
- <field name="company_id"/>
- <field name="operation_department_id"/>
- <field name="repair_department_id"/>
- <field name="remark"/>
- </tree>
- </field>
- </record>
- <record model="ir.ui.view" id="jc_device_fault_record_edit">
- <field name="name">故障记录新建</field>
- <field name="model">jc_device.fault_record</field>
- <field name="arch" type="xml">
- <form>
- <style>
- .o_form_view .o_form_sheet_bg .o_form_sheet{
- max-width: 99%;
- }
- </style>
- <header>
- <field name="id" attrs="{'invisible': True}"/>
- <field name="can_check" attrs="{'invisible': True}"/>
- <field name="can_uncheck" attrs="{'invisible': True}"/>
- <field name="can_finish" attrs="{'invisible': True}"/>
- <field name="can_unfinish" attrs="{'invisible': True}"/>
- <field name="can_nullify" attrs="{'invisible': True}"/>
- <field name="can_un_nullify" attrs="{'invisible': True}"/>
- <field name="bill_state" readonly="1" attrs="{'invisible': 1}"/>
- </header>
- <sheet>
- <widget name="web_ribbon" title="已审核" bg_color="bg-success"
- attrs="{'invisible': [('bill_state', '!=', '10')]}"/>
- <widget name="web_ribbon" title="已完毕" bg_color="bg-primary"
- attrs="{'invisible': [('bill_state', '!=', '20')]}"/>
- <widget name="web_ribbon" title="已作废" bg_color="bg-danger"
- attrs="{'invisible': [('bill_state', '!=', '-1')]}"/>
- <group name="group_top" string="故障记录" col="8">
- <field name="date"/>
- <field name="company_id" options="{'no_open':True,'no_create':True}"/>
- <field name="operation_department_id" options="{'no_open':True,'no_create':True}"/>
- <field name="repair_department_id" options="{'no_open':True,'no_create':True}"/>
- </group>
- <notebook>
- <page string="故障记录明细">
- <field name="detail" mode="tree">
- <form string="故障记录明细">
- <group col="4">
- <field name="equipment_id" options="{'no_open':True,'no_create':True}"/>
- <field name="coding"/>
- <field name="equipment_area_id"
- options="{'no_open':True,'no_create':True}"/>
- <field name="fault_id" options="{'no_open':True,'no_create':True}"/>
- <field name="fault_level_id" options="{'no_open':True,'no_create':True}"/>
- <field name="fault_time"/>
- <field name="repaired_time"/>
- <field name="power_off_minutes"/>
- <field name="product_influence_minutes"/>
- <field name="remark"/>
- </group>
- </form>
- <tree string="故障记录明细" editable="bottom">
- <field name="equipment_id" options="{'no_open':True,'no_create':True}"/>
- <field name="coding"/>
- <field name="equipment_area_id" options="{'no_open':True,'no_create':True}"/>
- <field name="fault_id" options="{'no_open':True,'no_create':True}"/>
- <field name="fault_level_id" options="{'no_open':True,'no_create':True}"/>
- <field name="fault_time"/>
- <field name="repaired_time"/>
- <field name="power_off_minutes"/>
- <field name="product_influence_minutes"/>
- <field name="remark"/>
- </tree>
- </field>
- </page>
- </notebook>
- <group name="group_operator" col="4">
- <field name="create_uid" options="{'no_open':True,'no_create':True}"/>
- <field name="check_uid" options="{'no_open':True,'no_create':True}"/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record model="ir.ui.view" id="fault_record_search_view">
- <field name="name">故障记录.search</field>
- <field name="model">jc_device.fault_record</field>
- <field name="arch" type="xml">
- <search>
- <field name="name"/>
- <field name="remark"/>
- <filter name="not_checked_bill" string="未审核"
- domain="[('bill_state', '=', '1')]"/>
- <filter name="checked_bill" string="已审核"
- domain="[('bill_state', '=', '10')]"/>
- <filter name="finished_bill" string="已完毕"
- domain="[('bill_state', '=', '20')]"/>
- <group string="Group By">
- <filter name="by_bill_state" string="单据状态"
- context="{'group_by': 'bill_state'}"/>
- </group>
- </search>
- </field>
- </record>
- <record id="jc_device_fault_record_pivot" model="ir.ui.view">
- <field name="name">故障记录.pivot</field>
- <field name="model">jc_device.fault_record</field>
- <field name="arch" type="xml">
- <pivot>
- </pivot>
- </field>
- </record>
- <record id="fault_record_check_server" model="ir.actions.server">
- <field name="name">审核</field>
- <field name="model_id" ref="jc_device.model_jc_device_fault_record"/>
- <field name="binding_model_id" ref="jc_device.model_jc_device_fault_record"/>
- <field name="state">code</field>
- <!-- ALTER TABLE ir_act_server ALTER COLUMN activity_user_type DROP NOT NULL;-->
- <!-- <field name="activity_user_type">generic</field>-->
- <field name="code">
- records.batch_check()
- </field>
- </record>
- <record id="fault_record_un_check_server" model="ir.actions.server">
- <field name="name">撤销审核</field>
- <field name="model_id" ref="jc_device.model_jc_device_fault_record"/>
- <field name="binding_model_id" ref="jc_device.model_jc_device_fault_record"/>
- <field name="state">code</field>
- <!-- ALTER TABLE ir_act_server ALTER COLUMN activity_user_type DROP NOT NULL;-->
- <!-- <field name="activity_user_type">generic</field>-->
- <field name="code">
- records.batch_un_check()
- </field>
- </record>
- <record id="jc_device_fault_record_analyse" model="ir.ui.view">
- <field name="name">故障记录分析</field>
- <field name="model">jc_device.fault_record</field>
- <field name="arch" type="xml">
- <analyse detail_field="detail" reference_field="fault_record_id"/>
- </field>
- </record>
- <record model="ir.actions.act_window" id="jc_device_fault_record_action_window">
- <field name="name">故障记录</field>
- <field name="res_model">jc_device.fault_record</field>
- <field name="view_mode">tree,form,pivot,analyse</field>
- </record>
- <menuitem name="故障记录" id="jc_device.menu_fault_record" parent="jc_device_menu_root"
- action="jc_device_fault_record_action_window" sequence="6"/>
- </data>
- </openerp>
|