584 lines
35 KiB
XML
584 lines
35 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="replace">
|
|
<field name="is_subcontract" invisible="1"/>
|
|
|
|
<field name="name" decoration-success="is_subcontract" decoration-bf="is_subcontract"/>
|
|
</field>
|
|
<field name="name" position="before">
|
|
<field name="sequence"/>
|
|
<field name='user_permissions' invisible="1"/>
|
|
</field>
|
|
<field name="name" position="after">
|
|
<field name="processing_panel"/>
|
|
</field>
|
|
<field name="state" position="after">
|
|
<field name="work_state" optional="hide"/>
|
|
</field>
|
|
<field name="product_id" position="after">
|
|
<field name="equipment_id" optional="hide"/>
|
|
</field>
|
|
<xpath expr="//field[@name='date_planned_start']" position="replace">
|
|
<field name="date_planned_start" string="计划开始日期" optional="show"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='date_planned_finished']" position="replace">
|
|
<field name="date_planned_finished" string="计划结束日期" optional="show"/>
|
|
</xpath>
|
|
<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),("name","=","获取CNC加工程序")]}
|
|
</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='%(mrp.act_mrp_block_workcenter_wo)d']" position="attributes">
|
|
<attribute name="attrs">{'invisible':
|
|
['|',("user_permissions","=",False),("name","=","获取CNC加工程序")]}
|
|
</attribute>
|
|
<attribute name="string">停工</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_open_wizard']" position="attributes">
|
|
<attribute name="invisible">1</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)]}"/>-->
|
|
<!-- <button name="%(mrp.act_mrp_block_workcenter_wo)d" type="action" string="Block" context="{'default_workcenter_id': workcenter_id}" class="btn-danger"-->
|
|
<!-- attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked')]}"/>-->
|
|
<!-- <button name="button_unblock" type="object" string="Unblock" context="{'default_workcenter_id': workcenter_id}" class="btn-danger"-->
|
|
<!-- attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked')]}"/>-->
|
|
<!-- <button name="action_open_wizard" type="object" icon="fa-external-link" class="oe_edit_only"-->
|
|
<!-- title="Open Work Order"/>-->
|
|
<!-- edit='false' create = 'false'-->
|
|
<tree position="attributes">
|
|
<attribute name="multi_edit"></attribute>
|
|
<attribute name="editable"></attribute>
|
|
<attribute name="create">False</attribute>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="mrp_workorder_action_tablet">
|
|
<field name="name">工单</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">mrp.workorder</field>
|
|
<field name="view_mode">tree,kanban,form</field>
|
|
<field name="view_ids" eval="[(5, 0, 0),
|
|
(0, 0, {'view_mode': 'tree', 'view_id': ref('mrp.mrp_production_workorder_tree_editable_view')}),
|
|
(0, 0, {'view_mode': 'kanban', 'view_id': ref('mrp.workcenter_line_kanban')}) ]"/>
|
|
<!-- <field name="target">fullscreen</field>-->
|
|
<field name="target">current</field>
|
|
<field name="domain">[('state', '!=', 'cancel'),('schedule_state', '=', '已排')]</field>
|
|
<field name="context">{'search_default_workcenter_id': active_id}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_workorder">
|
|
没有工单要做!
|
|
</p>
|
|
<p>
|
|
工作订单是作为制造订单的一部分执行的操作。
|
|
工序在物料清单中定义或直接添加到制造订单中。
|
|
</p>
|
|
<p>
|
|
使用工作台工作中心控制面板直接登记车间中的操作.
|
|
平板电脑为您的工人提供工作表,并允许他们报废产品,跟踪时间,
|
|
发起维护请求,执行质量测试等.
|
|
</p>
|
|
</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='state']" position="before">
|
|
<field name='user_permissions' invisible="1"/>
|
|
<field name='name' invisible="1"/>
|
|
<field name='routing_type' invisible="1"/>
|
|
<field name='is_delivery' invisible="1"/>
|
|
<button name="button_start" type="object" string="开始" class="btn-success"
|
|
attrs="{'invisible': ['|', '|', '|','|',('production_state','in', ('draft', 'done',
|
|
'cancel')), ('working_state', '=', 'blocked'), ('state', 'in', ('done', 'cancel')),
|
|
('is_user_working', '!=', False),('user_permissions','=',False)]}"
|
|
groups="sf_base.group_sf_mrp_user"/>
|
|
<button name="button_pending" type="object" string="暂停" class="btn-warning"
|
|
groups="sf_base.group_sf_mrp_user"
|
|
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>
|
|
<button name="button_finish" type="object" string="完成" class="btn-success"
|
|
groups="sf_base.group_sf_mrp_user"
|
|
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>
|
|
<button name="%(mrp.act_mrp_block_workcenter_wo)d" type="action" string="停工"
|
|
context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
|
groups="sf_base.group_sf_mrp_user"
|
|
attrs="{'invisible': ['|', '|','|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'),('user_permissions','=',False),('state','=','done')]}"/>
|
|
<button name="button_unblock" type="object" string="Unblock"
|
|
context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
|
groups="sf_base.group_sf_mrp_user"
|
|
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('state','=','done')]}"/>
|
|
<button name="button_workpiece_delivery" type="object" string="工件配送" class="btn-primary"
|
|
attrs="{'invisible': ['|',('routing_type','!=','装夹预调'),('is_delivery','=',True)]}"/>
|
|
|
|
</xpath>
|
|
<xpath expr="//page[1]" position="before">
|
|
<page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'>
|
|
<group>
|
|
<group>
|
|
<field name="product_tmpl_id_materials_id" widget="many2one"/>
|
|
<field name="product_tmpl_id_materials_type_id" widget="many2one"/>
|
|
|
|
</group>
|
|
<group>
|
|
<field name="product_tmpl_id_length"/>
|
|
<field name="product_tmpl_id_width"/>
|
|
<field name="product_tmpl_id_height"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
|
|
<!-- 隐藏物料清单-->
|
|
<!-- <xpath expr="//page[@name='components']" position="attributes">-->
|
|
<!-- <attribute name="invisible">1</attribute>-->
|
|
<!-- </xpath>-->
|
|
<!-- 隐藏物料清单-->
|
|
<xpath expr="//page[@name='components']" position="attributes">
|
|
<attribute name="string">物料</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='move_raw_ids']/tree/field[@name='product_id']" position="after">
|
|
<field name='materiel_length' string="长"/>
|
|
<field name='materiel_width' string="宽"/>
|
|
<field name='materiel_height' string="高"/>
|
|
</xpath>
|
|
<field name="production_id" position="after" invisible="0">
|
|
<group>
|
|
<field name="date_planned_start" invisible="1"/>
|
|
<field name="date_planned_finished" invisible="1"/>
|
|
<!-- <field name="production_id" readonly="1"/>-->
|
|
<field name="duration" widget="mrp_timer"
|
|
attrs="{'invisible': [('production_state','=', 'draft')], 'readonly': [('is_user_working', '=', True)]}"
|
|
sum="real duration"/>
|
|
<field name="glb_file" readonly="1" widget="Viewer3D" string="加工模型"/>
|
|
<field name="processing_panel" readonly="1"
|
|
attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/>
|
|
<field name="equipment_id"
|
|
attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/>
|
|
<field name="production_line_state"
|
|
attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/>
|
|
<field name="functional_fixture_id"
|
|
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
|
|
<field name="functional_fixture_code" force_save="1"
|
|
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
|
|
<field name="functional_fixture_type_id"
|
|
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
|
|
<field name="rfid_code" force_save="1" readonly="1" class="customRFID"/>
|
|
<script src="/sf_manufacturing/static/src/js/customRFID.js"></script>
|
|
</group>
|
|
<!-- <group>-->
|
|
<!-- <div>-->
|
|
<!-- <label for="glb_file" string="加工模型"/>-->
|
|
<!-- <field name="glb_file" readonly="1" widget="Viewer3D"/>-->
|
|
<!-- </div>-->
|
|
<!-- <!– <field name="glb_file" string="模型" readonly="1" widget="Viewer3D"/>–>-->
|
|
<!-- </group>-->
|
|
|
|
<!-- <field name="processing_panel" readonly="1" attrs="{'invisible': [('routing_type', 'in', ('获取CNC加工程序','装夹','解除装夹',-->
|
|
<!-- '前置三元定位检测','后置三元质量检测','解除装夹'))]}"/>-->
|
|
</field>
|
|
|
|
<xpath expr="//page[1]" position="before">
|
|
<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程序代码"
|
|
/>
|
|
</div>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
<!-- <page string="Components" name="components">-->
|
|
<xpath expr="//page[1]" position="before">
|
|
<!-- <page string="装夹托盘" attrs='{"invisible": [("routing_type","!=","装夹")]}'>-->
|
|
<!-- <group>-->
|
|
<!-- <field name="routing_type" invisible="1"/>-->
|
|
<!-- <field name="tray_code"/>-->
|
|
<!-- <field name="tray_id" readonly="1"/>-->
|
|
<!-- </group>-->
|
|
<!-- <group>-->
|
|
<!-- <field name="pro_code" readonly="1" attrs='{"invisible": [("pro_code_ok","=",False)]}'-->
|
|
<!-- style="color:green"/>-->
|
|
<!-- <field name="pro_code" readonly="1" attrs='{"invisible": [("pro_code_ok","!=",False)]}'/>-->
|
|
<!-- <div>-->
|
|
<!-- <field name="pro_code_ok" invisible="1"/>-->
|
|
<!-- </div>-->
|
|
|
|
<!-- </group>-->
|
|
<!-- <div class="col-12 col-lg-6 o_setting_box">-->
|
|
<!-- <button type="object" class="oe_highlight" name="gettray" string="绑定托盘"-->
|
|
<!-- attrs='{"invisible": ["|","|",("tray_id","!=",False),("state","!=","progress"),("production_id","=",False)]}'/>-->
|
|
|
|
<!-- </div>-->
|
|
<!-- </page>-->
|
|
<page string="工件装夹" attrs='{"invisible": [("routing_type","!=","装夹预调")]}'>
|
|
<group>
|
|
<group string="卡盘">
|
|
<field name="chuck_serial_number"/>
|
|
<field name="chuck_name"/>
|
|
<field name="chuck_brand_id"/>
|
|
<field name="chuck_type_id"/>
|
|
<field name="chuck_model_id"/>
|
|
</group>
|
|
<group string="托盘">
|
|
<field name="_barcode_scanned" widget="barcode_handler"/>
|
|
<field name="tray_serial_number" readonly="1" string="序列号"/>
|
|
<field name="tray_product_id" readonly="1" string="名称"/>
|
|
<field name="tray_brand_id" readonly="1" string="品牌"/>
|
|
<field name="tray_type_id" readonly="1" string="类型"/>
|
|
<field name="tray_model_id" readonly="1" string="型号"/>
|
|
</group>
|
|
</group>
|
|
<group string="预调程序信息">
|
|
<field name="preset_program_information" colspan="2" nolabel="1"
|
|
placeholder="如有预调程序信息请在此处输入....."/>
|
|
</group>
|
|
</page>
|
|
<page string="前置三元检测定位参数" attrs='{"invisible": [("routing_type","!=","装夹预调")]}'>
|
|
|
|
<div>左面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X1_axis" string="x"/>
|
|
<field name="X1_axis" class="o_form_label"
|
|
decoration-success="X1_axis > 0"
|
|
decoration-warning="X1_axis < 0"/>
|
|
<label for="Y1_axis" string="y"/>
|
|
<field name="Y1_axis" class="o_form_label"
|
|
decoration-success="Y1_axis > 0"
|
|
decoration-warning="Y1_axis < 0"/>
|
|
<label for="Z1_axis" string="z"/>
|
|
<field name="Z1_axis" class="o_form_label"
|
|
decoration-success="Z1_axis > 0"
|
|
decoration-warning="Z1_axis < 0"/>
|
|
<div></div>
|
|
<label for="X2_axis" string="x"/>
|
|
<field name="X2_axis" class="o_form_label"
|
|
decoration-success="X2_axis > 0"
|
|
decoration-warning="X2_axis < 0"/>
|
|
<label for="Y2_axis" string="y"/>
|
|
<field name="Y2_axis" class="o_form_label"
|
|
decoration-success="Y2_axis > 0"
|
|
decoration-warning="Y2_axis < 0"/>
|
|
<label for="Z2_axis" string="z"/>
|
|
<field name="Z2_axis" class="o_form_label"
|
|
decoration-success="Z2_axis > 0"
|
|
decoration-warning="Z2_axis < 0"/>
|
|
</div>
|
|
<div>前面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X3_axis" string="x"/>
|
|
<field name="X3_axis" class="o_form_label"
|
|
decoration-success="X3_axis > 0"
|
|
decoration-warning="X3_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y3_axis" string="y"/>
|
|
<field name="Y3_axis" class="o_form_label"
|
|
decoration-success="Y3_axis > 0"
|
|
decoration-warning="Y3_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z3_axis" string="z"/>
|
|
<field name="Z3_axis" class="o_form_label"
|
|
decoration-success="Z3_axis > 0"
|
|
decoration-warning="Z3_axis < 0"/>
|
|
<div></div>
|
|
<label for="X4_axis" string="x"/>
|
|
<field name="X4_axis" class="o_form_label"
|
|
decoration-success="X4_axis > 0"
|
|
decoration-warning="X4_axis < 0"
|
|
/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y4_axis" string="y"/>
|
|
<field name="Y4_axis" class="o_form_label"
|
|
decoration-success="Y4_axis > 0"
|
|
decoration-warning="Y4_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z4_axis" string="z"/>
|
|
<field name="Z4_axis" class="o_form_label"
|
|
decoration-success="Z4_axis > 0"
|
|
decoration-warning="Z4_axis < 0"/>
|
|
</div>
|
|
<div>右面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X5_axis" string="x"/>
|
|
<field name="X5_axis" class="o_form_label"
|
|
decoration-success="X5_axis > 0"
|
|
decoration-warning="X5_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y5_axis" string="y"/>
|
|
<field name="Y5_axis" class="o_form_label" decoration-success="Y5_axis > 0"
|
|
decoration-warning="Y5_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z5_axis" string="z"/>
|
|
<field name="Z5_axis" class="o_form_label" decoration-success="Z5_axis > 0"
|
|
decoration-warning="Z5_axis < 0"/>
|
|
<div></div>
|
|
<label for="X6_axis" string="x"/>
|
|
<field name="X6_axis" class="o_form_label" decoration-success="X6_axis > 0"
|
|
decoration-warning="X6_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y6_axis" string="y"/>
|
|
<field name="Y6_axis" class="o_form_label" decoration-success="Y6_axis > 0"
|
|
decoration-warning="Y6_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z6_axis" string="z"/>
|
|
<field name="Z6_axis" class="o_form_label" decoration-success="Z6_axis > 0"
|
|
decoration-warning="Z6_axis < 0"/>
|
|
</div>
|
|
<div>后面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X7_axis" string="x"/>
|
|
<field name="X7_axis" class="o_form_label" decoration-success="X7_axis > 0"
|
|
decoration-warning="X7_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y7_axis" string="y"/>
|
|
<field name="Y7_axis" class="o_form_label" decoration-success="Y7_axis > 0"
|
|
decoration-warning="Y7_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z7_axis" string="z"/>
|
|
<field name="Z7_axis" class="o_form_label" decoration-success="Z7_axis > 0"
|
|
decoration-warning="Z7_axis < 0"/>
|
|
<div></div>
|
|
<label for="X8_axis" string="x"/>
|
|
<field name="X8_axis" class="o_form_label" decoration-success="X8_axis > 0"
|
|
decoration-warning="X8_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y8_axis" string="y"/>
|
|
<field name="Y8_axis" class="o_form_label" decoration-success="Y8_axis > 0"
|
|
decoration-warning="Y8_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z8_axis" string="z"/>
|
|
<field name="Z8_axis" class="o_form_label" decoration-success="Z8_axis > 0"
|
|
decoration-warning="Z8_axis < 0"/>
|
|
</div>
|
|
<div>上面:</div>
|
|
<div class="o_address_format">
|
|
<label for="X9_axis" string="x"/>
|
|
<field name="X9_axis" class="o_form_label" decoration-success="X9_axis > 0"
|
|
decoration-warning="X9_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y9_axis" string="y"/>
|
|
<field name="Y9_axis" class="o_form_label" decoration-success="Y9_axis > 0"
|
|
decoration-warning="Y9_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z9_axis" string="z"/>
|
|
<field name="Z9_axis" class="o_form_label" decoration-success="Z9_axis > 0"
|
|
decoration-warning="Z9_axis < 0"/>
|
|
<div></div>
|
|
<label for="X10_axis" string="x"/>
|
|
<field name="X10_axis" class="o_form_label" decoration-success="X10_axis > 0"
|
|
decoration-warning="X10_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Y10_axis" string="y"/>
|
|
<field name="Y10_axis" class="o_form_label" decoration-success="Y10_axis > 0"
|
|
decoration-warning="Y10_axis < 0"/>
|
|
<span>&nbsp;</span>
|
|
<label for="Z10_axis" string="z"/>
|
|
<field name="Z10_axis" class="o_form_label" decoration-success="Z10_axis > 0"
|
|
decoration-warning="Z10_axis < 0"/>
|
|
</div>
|
|
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="object" class="oe_highlight" name="getcenter" string="计算定位"
|
|
attrs='{"invisible": ["|","|",("material_center_point","!=",False),("state","!=","progress"),("user_permissions","=",False)]}'/>
|
|
</div>
|
|
|
|
<group>
|
|
<field name="material_center_point" readonly="1"/>
|
|
<field name='X_deviation_angle' readonly="1"/>
|
|
</group>
|
|
</page>
|
|
<page string="工件配送" attrs='{"invisible": [("routing_type","!=","装夹预调")]}'>
|
|
<field name="workpiece_delivery_ids">
|
|
<tree editable="bottom">
|
|
<field name="production_id" invisible="1"/>
|
|
<field name="workpiece_code"/>
|
|
<field name="feeder_station_start" force_save="1"/>
|
|
<field name="feeder_station_destination"/>
|
|
<field name="production_line_id"/>
|
|
<field name="task_delivery_time" readonly="1"/>
|
|
<field name="task_completion_time" readonly="1"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
|
|
</xpath>
|
|
|
|
|
|
<xpath expr="//page[1]" position="before">
|
|
<field name="results" invisible="1"/>
|
|
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
|
<group>
|
|
<field name="detection_report_path" attrs='{"invisible":[("results","!=",False)]}'/>
|
|
<field name="test_results" widget="selection" attrs='{"invisible":[("results","!=",False)]}'/>
|
|
<field name="results" readonly="1" attrs='{"invisible":[("results","!=","合格")]}'/>
|
|
</group>
|
|
<div class="col-12 col-lg-6 o_setting_box">
|
|
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
|
string="检测确认"
|
|
attrs='{"invisible": ["|","|",("state","!=","progress"),("user_permissions","=",False),("results","=","合格")]}'/>
|
|
</div>
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="//page[1]" position="before">
|
|
<page string="CNC程序" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
|
<field name="cnc_ids" widget="one2many" string="工作程序">
|
|
<tree decoration-success="button_state" decoration-bf="button_state">
|
|
<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"/>
|
|
<field name="button_state" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
<group>
|
|
<field name="cnc_worksheet" string="工作指令" widget="pdf_viewer"/>
|
|
</group>
|
|
</page>
|
|
<page string="CMM程序" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
|
<field name="cmm_ids" widget="one2many" string="CMM程序">
|
|
<tree>
|
|
<field name="program_path"/>
|
|
<field name="program_date"/>
|
|
<field name="post_processing_name"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="//page[1]" position="before">
|
|
<page string="解除装夹" attrs='{"invisible": [("routing_type","!=","解除装夹")]}'>
|
|
<!-- <field name="tray_id" readonly="1"/>-->
|
|
<!-- <div class="col-12 col-lg-6 o_setting_box">-->
|
|
<!-- <button type="object" class="oe_highlight" name="unbindtray" string="解除装夹"-->
|
|
<!-- attrs='{"invisible": ["|",("state","!=","progress"),("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": ["|",("state","!=","progress"),("user_permissions","=",False)]}'/>-->
|
|
<!-- </div>-->
|
|
|
|
</page>
|
|
</xpath>
|
|
<xpath expr="//form//sheet//group//group//div[1]" position="after">
|
|
<label for="date_start" string="实际开始时间"/>
|
|
<div class="oe_inline">
|
|
<field name="date_start" class="mr8 oe_inline"/>
|
|
<strong class="mr8 oe_inline">到</strong>
|
|
<field name="date_finished" class="oe_inline"/>
|
|
</div>
|
|
</xpath>
|
|
<xpath expr="//form//sheet//group//group//div[3]" position="after">
|
|
<field name="is_ok"/>
|
|
<field name="processing_user_id"/>
|
|
<field name="inspection_user_id"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="mrp_workorder_action_schedule" model="ir.actions.act_window">
|
|
<field name="name">工单</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">mrp.workorder</field>
|
|
<field name="view_mode">tree,kanban,form</field>
|
|
<field name="view_id" ref="mrp.mrp_production_workorder_tree_editable_view"/>
|
|
<field name="search_view_id" ref="mrp.view_mrp_production_work_order_search"/>
|
|
<field name="domain">[('schedule_state', '=', '已排')]</field>
|
|
</record>
|
|
|
|
<!-- <menuitem id="menu_mrp_workorder_schedule_todo" -->
|
|
<!-- name="工单" -->
|
|
<!-- action="mrp_workorder_action_schedule" -->
|
|
<!-- parent="mrp.menu_mrp_manufacturing" -->
|
|
<!-- sequence="15"/> -->
|
|
|
|
<record id="mrp.menu_mrp_workorder_todo" model="ir.ui.menu">
|
|
<field name="active" eval="False"/>
|
|
</record>
|
|
|
|
|
|
<!--=========================================工件配送单列表======================================-->
|
|
<record id="sf_workpiece_delivery_tree" model="ir.ui.view">
|
|
<field name="name">工件配送</field>
|
|
<field name="model">sf.workpiece.delivery</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="工件配送">
|
|
<header>
|
|
<button name="button_delivery" type="object" string="配送"/>
|
|
</header>
|
|
<field name="status" widget="badge"
|
|
decoration-success="status == '已配送'"
|
|
decoration-warning="status == '待下发'"
|
|
decoration-danger="status == '待配送'"/>
|
|
<field name="production_id" string="工件编码"/>
|
|
<field name="workpiece_code"/>
|
|
<field name="production_line_id"/>
|
|
<field name="feeder_station_start"/>
|
|
<field name="feeder_station_destination"/>
|
|
<field name="task_delivery_time"/>
|
|
<field name="task_completion_time"/>
|
|
<field name="delivery_duration" widget="float_time"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="sf_workpiece_delivery_search" model="ir.ui.view">
|
|
<field name="name">工件配送</field>
|
|
<field name="model">sf.workpiece.delivery</field>
|
|
<field name="arch" type="xml">
|
|
<search string="工件配送">
|
|
<field name="production_id"/>
|
|
<field name="workpiece_code"/>
|
|
<field name="feeder_station_start"/>
|
|
<field name="production_line_id"/>
|
|
<field name="task_delivery_time"/>
|
|
<field name="feeder_station_destination"/>
|
|
<field name="task_completion_time"/>
|
|
<field name="delivery_duration"/>
|
|
<field name="status"/>
|
|
<searchpanel>
|
|
<field name="production_line_id" icon="fa-building" enable_counters="1"/>
|
|
<field name="status" icon="fa-building" enable_counters="1"/>
|
|
</searchpanel>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="sf_workpiece_delivery_act" model="ir.actions.act_window">
|
|
<field name="name">工件配送</field>
|
|
<field name="res_model">sf.workpiece.delivery</field>
|
|
<field name="view_mode">tree,search</field>
|
|
</record>
|
|
</odoo>
|
|
|