工作中心概述看板视图
This commit is contained in:
95
sf_route_workcenter/views/maintenance_views.xml
Normal file
95
sf_route_workcenter/views/maintenance_views.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="maintenance_equipment_view_form_inherit_mrp" model="ir.ui.view">
|
||||
<field name="name">maintenance.equipment.view.form.inherit.mrp</field>
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="button_mrp_workcenter" type="object" class="oe_stat_button"
|
||||
icon="fa-cogs" string="Work Center" attrs="{'invisible': [('workcenter_id', '=', False)]}" groups="mrp.group_mrp_routings">
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='location']" position="after">
|
||||
<field name="workcenter_id" context="{'default_company_id':company_id}" groups="mrp.group_mrp_routings"/>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='maintenance']" position="after">
|
||||
<group name="statistics">
|
||||
<label for="expected_mtbf" string="Expected Mean Time Between Failure"/>
|
||||
<div class="o_row">
|
||||
<field name="expected_mtbf"/> days
|
||||
</div>
|
||||
<label for="mtbf" string="Mean Time Between Failure"/>
|
||||
<div class="o_row">
|
||||
<field name="mtbf" /> days
|
||||
</div>
|
||||
<label for="estimated_next_failure" string="Estimated Next Failure"/>
|
||||
<div class="o_row">
|
||||
<field name="estimated_next_failure" />
|
||||
</div>
|
||||
<field name="latest_failure_date" string="Latest Failure" />
|
||||
<label for="mttr" string="Mean Time To Repair"/>
|
||||
<div class="o_row">
|
||||
<field name="mttr" /> days
|
||||
</div>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="maintenance_request_view_form_inherit_mrp" model="ir.ui.view">
|
||||
<field name="name">maintenance.request.view.form.inherit.mrp</field>
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='maintenance_type']" position="after">
|
||||
<field name="production_company_id" invisible="1"/>
|
||||
<field name="workorder_id" invisible="1"/>
|
||||
<field name="production_id" options="{'no_create': True, 'no_open': True}"/>
|
||||
<field name="workorder_id" attrs="{'invisible': [('production_id', '=', False)]}" options="{'no_create': True, 'no_open': True}" domain="[('production_id', '=', production_id)]" groups="mrp.group_mrp_routings"/>
|
||||
<!-- <field name="repair_id"/> -->
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('oe_chatter')]" position="after">
|
||||
<div invisible="not context.get('discard_on_footer_button', False)">
|
||||
<footer class="oe_edit_only">
|
||||
<button special="save" data-hotkey="v" string="Save" class="oe_highlight"/>
|
||||
<button string="Discard" special="cancel" data-hotkey="z"/>
|
||||
</footer>
|
||||
</div>
|
||||
</xpath>
|
||||
<field name="equipment_id" position="attributes">
|
||||
<attribute name="domain">['|', (not workorder_id and 1 or 0, '=', 1), '|', ('workcenter_id', '=', False), ('workcenter_id.order_ids', 'in', workorder_id)]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="maintenance_request_view_search_inherit_mrp" model="ir.ui.view">
|
||||
<field name="name">maintenence.request.view.search.inherit.mrp</field>
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='maintenance_team_id']" position="after">
|
||||
<field name="production_id" string="Operation" filter_domain="['|', ('production_id', 'ilike', self), ('workorder_id', 'ilike', self)]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="maintenance.menu_equipment_form"
|
||||
name="Equipments"
|
||||
parent="maintenance.menu_maintenance_title"
|
||||
groups="maintenance.group_equipment_manager,base.group_user"
|
||||
sequence="2"/>
|
||||
<menuitem id="menu_workcenter_tree"
|
||||
action="mrp.mrp_workcenter_action"
|
||||
groups="mrp.group_mrp_routings"
|
||||
parent="maintenance.menu_equipment_form"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
id="menu_equipment_dashboard"
|
||||
name="Machines & Tools"
|
||||
parent="maintenance.menu_equipment_form"
|
||||
action="maintenance.hr_equipment_action"
|
||||
sequence="2"/>
|
||||
|
||||
</odoo>
|
||||
60
sf_route_workcenter/views/mrp_views.xml
Normal file
60
sf_route_workcenter/views/mrp_views.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- MRP.WORKCENTER -->
|
||||
<record id="mrp_workcenter_view_form_inherit_maintenance" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.form.inherit.maintenance</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_workcenter_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page string="Equipment" name="equipment">
|
||||
<field name="equipment_ids" widget="many2many">
|
||||
<tree string="Equipments">
|
||||
<field name="name"/>
|
||||
<field name="technician_user_id"/>
|
||||
<field name="category_id"/>
|
||||
<field name="mtbf"/>
|
||||
<field name="mttr"/>
|
||||
<field name="estimated_next_failure" string="Est. Next Failure"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_workcenter_view_kanban_inherit_maintenance" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.view.kanban.inherit.maintenance</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='plan_order']" position="after">
|
||||
<div>
|
||||
<a name="%(maintenance.hr_equipment_request_action)d" type="action">Maintenance</a>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- MRP.PRODUCTION -->
|
||||
<record id="mrp_production_view_form_inherit_maintenance" model="ir.ui.view">
|
||||
<field name="name">mrp.production.view.form.inherit.maintenance</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_cancel" position="before">
|
||||
<button name="button_maintenance_req" type="object" string="Maintenance Request"/>
|
||||
</button>
|
||||
<div name="button_box" position="inside">
|
||||
<button name="open_maintenance_request_mo" type="object" class="oe_stat_button" icon="fa-wrench" attrs="{'invisible': [('maintenance_count', '=', 0)]}" context="{'search_default_production_id': active_id}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="maintenance_count"/></span>
|
||||
<span class="o_stat_text">Maintenance</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
37
sf_route_workcenter/views/mrp_workcenter_views.xml
Normal file
37
sf_route_workcenter/views/mrp_workcenter_views.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<odoo>
|
||||
<record id="mrp_workcenter_view_kanban_inherit_workorder" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.view.kanban.inherit.mrp.workorder</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Desktop view -->
|
||||
<xpath expr="//div[@name='o_wo']" position="inside">
|
||||
<button class="btn btn-secondary fa fa-desktop" name="action_work_order" type="object" context="{'search_default_ready': 1, 'search_default_progress': 1, 'search_default_pending': 1, 'desktop_list_view': 1, 'search_default_workcenter_id': active_id}" title="Work orders" aria-label="Work orders"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- override to change the no content image -->
|
||||
<record id="mrp.action_work_orders" model="ir.actions.act_window">
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_workorder">
|
||||
No work orders to do!
|
||||
</p><p>
|
||||
Work orders are operations to do as part of a manufacturing order.
|
||||
Operations are defined in the bill of materials or added in the manufacturing order directly.
|
||||
</p><p>
|
||||
Use the table work center control panel to register operations in the shop floor directly.
|
||||
The tablet provides worksheets for your workers and allow them to scrap products, track time,
|
||||
launch a maintenance request, perform quality tests, etc.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_mrp_dashboard"
|
||||
name="工作中心概述"
|
||||
action="mrp.mrp_workcenter_kanban_action"
|
||||
groups="mrp.group_mrp_routings"
|
||||
parent="mrp.menu_mrp_root"
|
||||
sequence="5"/>
|
||||
|
||||
</odoo>
|
||||
@@ -1,6 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record model="ir.actions.act_window" id="mrp_workorder_action_tablet">
|
||||
<field name="name">Work Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('mrp.workcenter_line_kanban')}),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('mrp.mrp_production_workorder_tree_editable_view')}) ]"/>
|
||||
<field name="target">fullscreen</field>
|
||||
<field name="domain">[('state', 'not in', ['done', 'cancel'])]</field>
|
||||
<field name="context">{'search_default_workcenter_id': active_id}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_workorder">
|
||||
No work orders to do!
|
||||
</p><p>
|
||||
Work orders are operations to do as part of a manufacturing order.
|
||||
Operations are defined in the bill of materials or added in the manufacturing order directly.
|
||||
</p><p>
|
||||
Use the table work center control panel to register operations in the shop floor directly.
|
||||
The tablet provides worksheets for your workers and allow them to scrap products, track time,
|
||||
launch a maintenance request, perform quality tests, etc.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="sf_install_the_tray_workorder_form_view" model="ir.ui.view">
|
||||
<field name="name">装夹工序工单</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
@@ -47,97 +73,97 @@
|
||||
<div>左面:</div>
|
||||
<div></div>
|
||||
<div class="o_address_city">
|
||||
<label for="X1_axis" string="Lx1"/>
|
||||
<label for="X1_axis" string="x1"/>
|
||||
<field name='X1_axis' class="o_address_city"/>
|
||||
<label for="Y1_axis" string="Ly1"/>
|
||||
<label for="Y1_axis" string="y1"/>
|
||||
<field name='Y1_axis' class="o_address_city"/>
|
||||
<label for="Z1_axis" string="Lz1"/>
|
||||
<label for="Z1_axis" string="z1"/>
|
||||
<field name='Z1_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div class="o_address_city">
|
||||
<label for="X2_axis" string="Lx2"/>
|
||||
<label for="X2_axis" string="x2"/>
|
||||
<field name='X2_axis' class="o_address_city"/>
|
||||
<label for="Y2_axis" string="Ly2"/>
|
||||
<label for="Y2_axis" string="y2"/>
|
||||
<field name='Y2_axis' class="o_address_city"/>
|
||||
<label for="Z2_axis" string="Lz2"/>
|
||||
<label for="Z2_axis" string="z2"/>
|
||||
<field name='Z2_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div>前面:</div>
|
||||
<div></div>
|
||||
<div class="o_address_city">
|
||||
<label for="X3_axis" string="Fx1"/>
|
||||
<label for="X3_axis" string="x1"/>
|
||||
<field name='X3_axis' class="o_address_city"/>
|
||||
<label for="Y3_axis" string="Fy1"/>
|
||||
<label for="Y3_axis" string="y1"/>
|
||||
<field name='Y3_axis' class="o_address_city"/>
|
||||
<label for="Z3_axis" string="Fz1"/>
|
||||
<label for="Z3_axis" string="z1"/>
|
||||
<field name='Z3_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div class="o_address_city">
|
||||
<label for="X4_axis" string="Fx2"/>
|
||||
<label for="X4_axis" string="x2"/>
|
||||
<field name='X4_axis' class="o_address_city"/>
|
||||
<label for="Y4_axis" string="Fy2"/>
|
||||
<label for="Y4_axis" string="y2"/>
|
||||
<field name='Y4_axis' class="o_address_city"/>
|
||||
<label for="Z4_axis" string="Fz2"/>
|
||||
<label for="Z4_axis" string="z2"/>
|
||||
<field name='Z4_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div>右面:</div>
|
||||
<div></div>
|
||||
<div class="o_address_city">
|
||||
<label for="X5_axis" string="Rx1"/>
|
||||
<label for="X5_axis" string="x1"/>
|
||||
<field name='X5_axis' class="o_address_city"/>
|
||||
<label for="Y5_axis" string="Ry1"/>
|
||||
<label for="Y5_axis" string="y1"/>
|
||||
<field name='Y5_axis' class="o_address_city"/>
|
||||
<label for="Z5_axis" string="Rz1"/>
|
||||
<label for="Z5_axis" string="z1"/>
|
||||
<field name='Z5_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div class="o_address_city">
|
||||
<label for="X6_axis" string="Rx2"/>
|
||||
<label for="X6_axis" string="x2"/>
|
||||
<field name='X6_axis' class="o_address_city"/>
|
||||
<label for="Y6_axis" string="Ry2"/>
|
||||
<label for="Y6_axis" string="y2"/>
|
||||
<field name='Y6_axis' class="o_address_city"/>
|
||||
<label for="Z6_axis" string="Rz2"/>
|
||||
<label for="Z6_axis" string="z2"/>
|
||||
<field name='Z6_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div>下面:</div>
|
||||
<div></div>
|
||||
<div class="o_address_city">
|
||||
<label for="X7_axis" string="Bx1"/>
|
||||
<label for="X7_axis" string="x1"/>
|
||||
<field name='X7_axis' class="o_address_city"/>
|
||||
<label for="Y7_axis" string="By1"/>
|
||||
<label for="Y7_axis" string="y1"/>
|
||||
<field name='Y7_axis' class="o_address_city"/>
|
||||
<label for="Z7_axis" string="Bz1"/>
|
||||
<label for="Z7_axis" string="z1"/>
|
||||
<field name='Z7_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div class="o_address_city">
|
||||
<label for="X8_axis" string="Bx2"/>
|
||||
<label for="X8_axis" string="x2"/>
|
||||
<field name='X8_axis' class="o_address_city"/>
|
||||
<label for="Y8_axis" string="By2"/>
|
||||
<label for="Y8_axis" string="y2"/>
|
||||
<field name='Y8_axis' class="o_address_city"/>
|
||||
<label for="Z8_axis" string="Bz2"/>
|
||||
<label for="Z8_axis" string="z2"/>
|
||||
<field name='Z8_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div>上面:</div>
|
||||
<div></div>
|
||||
<div class="o_address_city">
|
||||
<label for="X9_axis" string="Ux1"/>
|
||||
<label for="X9_axis" string="x1"/>
|
||||
<field name='X9_axis' class="o_address_city"/>
|
||||
<label for="Y9_axis" string="Uy1"/>
|
||||
<label for="Y9_axis" string="y1"/>
|
||||
<field name='Y9_axis' class="o_address_city"/>
|
||||
<label for="Z9_axis" string="Uz1"/>
|
||||
<label for="Z9_axis" string="z1"/>
|
||||
<field name='Z9_axis' class="o_address_city"/>
|
||||
</div>
|
||||
<div class="o_address_city">
|
||||
<label for="X10_axis" string="Ux2"/>
|
||||
<label for="X10_axis" string="x2"/>
|
||||
<field name='X10_axis' class="o_address_city"/>
|
||||
<label for="Y10_axis" string="Uy2"/>
|
||||
<label for="Y10_axis" string="y2"/>
|
||||
<field name='Y10_axis' class="o_address_city"/>
|
||||
<label for="Z10_axis" string="Uz2"/>
|
||||
<label for="Z10_axis" string="z2"/>
|
||||
<field name='Z10_axis' class="o_address_city"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<button type="object" class="oe_highlight" name="getcenter" string="中心定位"
|
||||
<button type="object" class="oe_highlight" name="getcenter" string="计算定位"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user