优化sf获取cnc程序和ftp
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
<form string="模型类型">
|
||||
<group>
|
||||
<field name="name" required="1"/>
|
||||
<field name="embryo_tolerance" string="胚料容余(mm)"/>
|
||||
<field name="embryo_tolerance" required="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name='routing_tmpl_ids'>
|
||||
|
||||
@@ -24,14 +24,16 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_workcenter_view_kanban_inherit_workorder" model="ir.ui.view">
|
||||
<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"/>
|
||||
<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>
|
||||
@@ -39,25 +41,46 @@
|
||||
<!-- 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>
|
||||
<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="mrp_workcenter_kanban_action1" model="ir.actions.act_window">
|
||||
<field name="name">Work Centers Overview</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workcenter</field>
|
||||
<field name="view_mode">kanban,form</field>
|
||||
<field name="view_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||
<field name="search_view_id" ref="mrp.view_mrp_workcenter_search"/>
|
||||
<field name="domain">[('users_ids','in',uid)]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new work center
|
||||
</p>
|
||||
<p>
|
||||
Manufacturing operations are processed at Work Centers. A Work Center can be composed of
|
||||
workers and/or machines, they are used for costing, scheduling, capacity planning, etc.
|
||||
They can be defined via the configuration menu.
|
||||
</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"/>
|
||||
name="工作中心概述"
|
||||
action="mrp_workcenter_kanban_action1"
|
||||
groups="mrp.group_mrp_routings"
|
||||
parent="mrp.menu_mrp_root"
|
||||
sequence="5"/>
|
||||
|
||||
<!-- MRP.WORKCENTER -->
|
||||
<record model="ir.ui.view" id="view_mrp_workcenter_form_inherit_sf">
|
||||
@@ -79,6 +102,9 @@
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='company_id']" position="after">
|
||||
<field name="users_ids" widget="many2many_tags" string="可操作用户"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='alternative_workcenter_ids']" position="after">
|
||||
<field name="machine_tool_id" domain="[('is_binding', '=', False)]"/>
|
||||
|
||||
@@ -7,10 +7,30 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="before">
|
||||
<field name="sequence"/>
|
||||
<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>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -57,15 +77,27 @@
|
||||
<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="programming_no" readonly="1"
|
||||
attrs='{"invisible": [("routing_type","!=","获取CNC加工程序")]}'/>
|
||||
</field>
|
||||
<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加工程序")]}'>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<button type="object" class="oe_highlight" name="fetchCNC" string="获取CNC程序代码"/>
|
||||
</div>
|
||||
<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>
|
||||
@@ -189,7 +221,8 @@
|
||||
</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="计算定位"
|
||||
attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
@@ -231,7 +264,7 @@
|
||||
</group>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
||||
string="检测确认"/>
|
||||
string="检测确认" attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
||||
</div>
|
||||
</page>
|
||||
</xpath>
|
||||
@@ -239,11 +272,12 @@
|
||||
<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="解除装夹"/>
|
||||
<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="打印标签"/>
|
||||
string="打印标签" attrs='{"invisible": [("user_permissions","=",False)]}'/>
|
||||
</div>
|
||||
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user