增加合并下发向导,增加cnc模型的缺省tree视图

This commit is contained in:
mgw
2023-02-23 08:52:56 +08:00
parent d81cf77bbe
commit 28659bfc95
13 changed files with 260 additions and 9 deletions

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sf_cnc_tree_view" model="ir.ui.view">
<field name="name">sf.cnc.tree</field>
<field name="model">sf.cnc.processing</field>
<field name="arch" type="xml">
<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>
</record>
</odoo>

View File

@@ -19,11 +19,13 @@
class="btn-primary" attrs='{"invisible": ["|",
("state","!=","progress"),("user_permissions","=",False)]}'/>
<span>&#32;</span>
<field name="button_up_all_state" attrs='{"invisible": ["|",
("state","!=","progress"),("user_permissions","=",False)]}'/>
<!-- <field name="button_up_all_state" attrs='{"invisible": ["|",-->
<!-- ("state","!=","progress"),("user_permissions","=",False)]}'/>-->
<button string="一键下发" name="up_all" type="object" style="text-align: right;" confirm="是否确认一键下发"
class="btn-primary" attrs='{"invisible": ["|",
("state","!=","progress"),("user_permissions","=",False)]}'/>
<span>&#32;</span>
<button string="合并下发" id="action_up_select" name="%(sf_machine_connect.action_up_select)d" type="action" class="btn-primary" context="{'default_workorder_id': id}"/>
</div>
</div>
</group>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_delivery_record_form_inherit_sf" model="ir.ui.view">
<field name="name">delivery.record.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="//page[last()-3]" position="before">
<!-- <page string="下发记录" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>-->
<page string="下发记录">
<group string="机床信息">
<field name="machine_tool_name"/>
<field name="machine_tool_type_id"/>
<field name="machine_tool_machine_ip"/>
</group>
<group string="运行信息">
<field name="machine_tool_timestamp"/>
<field name="machine_tool_status"/>
<field name="machine_tool_run_status"/>
<field name="machine_tool_time_on"/>
<field name="machine_tool_time_on_now"/>
<field name="machine_tool_tool_num"/>
<field name="machine_tool_program"/>
<field name="machine_tool_cut_status"/>
<field name="machine_tool_compensation_value_x"/>
<field name="machine_tool_compensation_value_y"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>

View File

@@ -26,5 +26,18 @@
</xpath>
</field>
</record>
<!-- <record id="app_view_quotation_tree" model="ir.ui.view">-->
<!-- <field name="name">app.sale.order.form</field>-->
<!-- <field name="model">mrp.workorder</field>-->
<!-- <field name="inherit_id" ref="sf_manufacturing.view_mrp_production_workorder_tray_form_inherit_sf"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <xpath expr="//page//field[@name='cnc_ids']//tree" position="attributes">-->
<!-- <attribute name="bg_colors">-->
<!--&lt;!&ndash; Gold:state in ('sale');LightGreen:state in ('done')&ndash;&gt;-->
<!-- LightGreen:button_state is ('False')-->
<!-- </attribute>-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
</odoo>