# Conflicts: # sf_manufacturing/models/__init__.py # sf_manufacturing/models/mrp_workcenter.py # sf_manufacturing/models/mrp_workorder.py # sf_manufacturing/views/mrp_workorder_view.xml
319 lines
18 KiB
XML
319 lines
18 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<record model="ir.ui.view" id="view_mrp_production_workorder_tree_editable_inherit_sf">
|
|
<field name="name">mrp.production.workorder.tree.editable.inherit.sf</field>
|
|
<field name="model">mrp.workorder</field>
|
|
<field name="inherit_id" ref="mrp.mrp_production_workorder_tree_editable_view"/>
|
|
<field name="arch" type="xml">
|
|
<field name="name" position="before">
|
|
<field name="sequence"/>
|
|
<field name='user_permissions'/>
|
|
<field name='user_permissions'/>
|
|
</field>
|
|
<field name="name" position="after">
|
|
<field name="processing_panel"/>
|
|
</field>
|
|
<field name="state" position="after">
|
|
<field name="work_state"/>
|
|
</field>
|
|
<xpath expr="//button[@name='button_start']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', '|', '|','|', ('production_state','in', ('draft', 'done',
|
|
'cancel')), ('working_state', '=', 'blocked'), ('state', 'in', ('done', 'cancel')),
|
|
('is_user_working', '!=', False),("user_permissions","=",False)]}
|
|
</attribute>
|
|
</xpath>
|
|
<!-- <button name="button_start" type="object" string="Start" class="btn-success"-->
|
|
<!-- attrs="{'invisible': ['|', '|', '|', ('production_state','in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('state', 'in', ('done', 'cancel')), ('is_user_working', '!=', False)]}"/>-->
|
|
<!-- <button name="button_pending" type="object" string="Pause" class="btn-warning"-->
|
|
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>-->
|
|
<!-- <button name="button_finish" type="object" string="Done" class="btn-success"-->
|
|
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>-->
|
|
<tree position="attributes">
|
|
<attribute name="multi_edit"></attribute>
|
|
<attribute name="editable"></attribute>
|
|
</tree>
|
|
<xpath expr="//button[@name='button_start']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', '|', '|','|', ('production_state','in', ('draft', 'done',
|
|
'cancel')), ('working_state', '=', 'blocked'), ('state', 'in', ('done', 'cancel')),
|
|
('is_user_working', '!=', False),("user_permissions","=",False)]}
|
|
</attribute>
|
|
</xpath>
|
|
<!-- <button name="button_start" type="object" string="Start" class="btn-success"-->
|
|
<!-- attrs="{'invisible': ['|', '|', '|', ('production_state','in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('state', 'in', ('done', 'cancel')), ('is_user_working', '!=', False)]}"/>-->
|
|
<!-- <button name="button_pending" type="object" string="Pause" class="btn-warning"-->
|
|
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>-->
|
|
<!-- <button name="button_finish" type="object" string="Done" class="btn-success"-->
|
|
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>-->
|
|
<tree position="attributes">
|
|
<attribute name="multi_edit"></attribute>
|
|
<attribute name="editable"></attribute>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<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 model="ir.ui.view" id="view_mrp_production_workorder_form_inherit_sf">-->
|
|
<!-- <field name="name">mrp.production.workorder.form.inherit.sf</field>-->
|
|
<!-- <field name="model">mrp.workorder</field>-->
|
|
<!-- <field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>-->
|
|
<!-- <field name="arch" type="xml">-->
|
|
<!-- <field name="production_id" position="after">-->
|
|
<!-- <field name="processing_panel" readonly="1"/>-->
|
|
<!-- </field>-->
|
|
<!-- </field>-->
|
|
<!-- </record>-->
|
|
|
|
<record id="view_mrp_production_workorder_tray_form_inherit_sf" model="ir.ui.view">
|
|
<field name="name">mrp.production.workorder.tray.form.inherit.sf</field>
|
|
<field name="model">mrp.workorder</field>
|
|
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="field[@name='is_user_working']" position="before">
|
|
<field name='user_permissions' invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//page[last()]" position="after">
|
|
<page string="获取CNC加工程序" attrs='{"invisible": [("routing_type","!=","获取CNC加工程序")]}'>
|
|
<group>
|
|
<field name="programming_no" readonly="1"
|
|
attrs='{"invisible": [("programming_no","=",False)]}'/>
|
|
<field name="programming_state" readonly="1"
|
|
attrs='{"invisible": [("programming_no","=",False)]}'/>
|
|
</group>
|
|
<group>
|
|
<div class="col-12 col-lg-6 o_setting_box" style="white-space: nowrap">
|
|
<button type="object" class="oe_highlight" name="fetchCNC" string="获取CNC程序代码"
|
|
attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
<button type="object" class="oe_highlight disabled" name="fetchCNC" string="获取CNC程序代码"
|
|
attrs='{"invisible": ["|",("programming_no","=",False),("programming_no","=",False)]}'/>
|
|
</div>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="field[@name='is_user_working']" position="before">
|
|
<field name='user_permissions' invisible="1"/>
|
|
</xpath>
|
|
<xpath expr="//page[last()]" position="after">
|
|
<page string="装夹托盘" attrs='{"invisible": [("routing_type","!=","装夹")]}'>
|
|
<group>
|
|
<field name="routing_type" invisible="1"/>
|
|
<field name="processing_panel" readonly="1"/>
|
|
<field name="tray_code"/>
|
|
|
|
</group>
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="object" class="oe_highlight" name="gettray" string="绑定托盘"
|
|
attrs='{"invisible": [("production_id","=",False)]}'/>
|
|
</div>
|
|
</page>
|
|
|
|
</xpath>
|
|
<xpath expr="//page[last()]" position="after">
|
|
<page string="三元前置检测定位参数" attrs='{"invisible": [("routing_type","!=","前置三元定位检测")]}'>
|
|
<group>
|
|
<group>
|
|
<field name="processing_panel" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<div>左面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X1_axis" string="x"/>
|
|
<field name="X1_axis" class="o_form_label"/>
|
|
<label for="Y1_axis" string="y"/>
|
|
<field name="Y1_axis" class="o_form_label"/>
|
|
<label for="Z1_axis" string="z"/>
|
|
<field name="Z1_axis" class="o_form_label"/>
|
|
<div></div>
|
|
<label for="X2_axis" string="x"/>
|
|
<field name="X2_axis" class="o_form_label"/>
|
|
<label for="Y2_axis" string="y"/>
|
|
<field name="Y2_axis" class="o_form_label"/>
|
|
<label for="Z2_axis" string="z"/>
|
|
<field name="Z2_axis" class="o_form_label"/>
|
|
</div>
|
|
<div>前面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X3_axis" string="x"/>
|
|
<field name="X3_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y3_axis" string="y"/>
|
|
<field name="Y3_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z3_axis" string="z"/>
|
|
<field name="Z3_axis" class="o_form_label"/>
|
|
<div></div>
|
|
<label for="X4_axis" string="x"/>
|
|
<field name="X4_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y4_axis" string="y"/>
|
|
<field name="Y4_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z4_axis" string="z"/>
|
|
<field name="Z4_axis" class="o_form_label"/>
|
|
</div>
|
|
<div>右面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X5_axis" string="x"/>
|
|
<field name="X5_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y5_axis" string="y"/>
|
|
<field name="Y5_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z5_axis" string="z"/>
|
|
<field name="Z5_axis" class="o_form_label"/>
|
|
<div></div>
|
|
<label for="X6_axis" string="x"/>
|
|
<field name="X6_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y6_axis" string="y"/>
|
|
<field name="Y6_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z6_axis" string="z"/>
|
|
<field name="Z6_axis" class="o_form_label"/>
|
|
</div>
|
|
<div>后面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X7_axis" string="x"/>
|
|
<field name="X7_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y7_axis" string="y"/>
|
|
<field name="Y7_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z7_axis" string="z"/>
|
|
<field name="Z7_axis" class="o_form_label"/>
|
|
<div></div>
|
|
<label for="X8_axis" string="x"/>
|
|
<field name="X8_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y8_axis" string="y"/>
|
|
<field name="Y8_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z8_axis" string="z"/>
|
|
<field name="Z8_axis" class="o_form_label"/>
|
|
</div>
|
|
<div>上面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X9_axis" string="x"/>
|
|
<field name="X9_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y9_axis" string="y"/>
|
|
<field name="Y9_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z9_axis" string="z"/>
|
|
<field name="Z9_axis" class="o_form_label"/>
|
|
<div></div>
|
|
<label for="X10_axis" string="x"/>
|
|
<field name="X10_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y10_axis" string="y"/>
|
|
<field name="Y10_axis" class="o_form_label"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z10_axis" string="z"/>
|
|
<field name="Z10_axis" class="o_form_label"/>
|
|
</div>
|
|
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
|
|
<button type="object" class="oe_highlight" name="getcenter" string="计算定位"
|
|
attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
|
|
<button type="object" class="oe_highlight" name="getcenter" string="计算定位"
|
|
attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
</div>
|
|
|
|
<group>
|
|
<field name="material_center_point"/>
|
|
<field name='X_deviation_angle'/>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
|
|
<xpath expr="//page[last()]" position="after">
|
|
<page string="CNC程序" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
|
<group>
|
|
<field name="cnc_ids" widget="one2many" string="工作程序">
|
|
<tree>
|
|
<field name="sequence_number"/>
|
|
<field name="program_name"/>
|
|
<field name="cnc_id" string="文件"/>
|
|
<field name="cutting_tool_name"/>
|
|
<field name="cutting_tool_no"/>
|
|
<field name="processing_type"/>
|
|
<field name="margin_x_y"/>
|
|
<field name="margin_z"/>
|
|
<field name="depth_of_processing_z"/>
|
|
<field name="cutting_tool_extension_length"/>
|
|
<field name="cutting_tool_handle_type"/>
|
|
<field name="estimated_processing_time"/>
|
|
<field name="remark"/>
|
|
</tree>
|
|
</field>
|
|
<field name="cnc_worksheet" string="工作指令" widget="pdf_viewer"/>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="//page[last()]" position="after">
|
|
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","后置三元质量检测")]}'>
|
|
<group>
|
|
<field name="test_results" widget="selection"/>
|
|
</group>
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
|
string="检测确认" attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
</div>
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="//page[last()]" position="after">
|
|
<page string="解除装夹" attrs='{"invisible": [("routing_type","!=","解除装夹")]}'>
|
|
|
|
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="object" class="oe_highlight" name="unbindtray" string="解除装夹"
|
|
attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
</div>
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="action" class="oe_highlight" name="sf_manufacturing.label_sf_tray_code1"
|
|
string="打印标签" attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
</div>
|
|
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="object" class="oe_highlight" name="unbindtray" string="解除装夹"
|
|
attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
</div>
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="action" class="oe_highlight" name="sf_manufacturing.label_sf_tray_code1"
|
|
string="打印标签" attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
|
</div>
|
|
>>>>>>> 3d882f5492685cfdb3cd9960bd24cdf9ef247f79
|
|
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|