修改sf_machine_connect模块以适配新的设备构成

This commit is contained in:
mgw
2023-11-22 14:22:41 +08:00
parent cc58425f50
commit ae6ec7183e
6 changed files with 79 additions and 77 deletions

View File

@@ -2,14 +2,14 @@
<odoo>
<record id="view_tree_mrs_machine_tool_inherited" model="ir.ui.view">
<field name="name">sf_base_extension</field>
<field name="model">sf.machine_tool</field>
<field name="inherit_id" ref="sf_base.sf_machine_tool_form"/>
<field name="model">maintenance.equipment</field>
<field name="inherit_id" ref="sf_maintenance.sf_hr_equipment_view_form"/>
<field eval="20" name="priority"/>
<field name="arch" type="xml">
<!-- <xpath expr="//field[@name='knife_type']" position="before">-->
<xpath expr="//form//notebook//page[1]" position="inside">
<xpath expr="//form//notebook//page[1]" position="after">
<!-- <xpath expr="//page[@name='other']" position="before">-->
<notebook>
<!-- <notebook> -->
<page string="机床监控">
<group string='状态监控'>
<group>
@@ -256,49 +256,51 @@
</group>
</group>
</page>
</notebook>
<!-- </notebook> -->
</xpath>
</field>
</record>
<record id="view_cutting_tool_inherited" model="ir.ui.view">
<field name="name">sf_cutting_tool_extension</field>
<field name="model">sf.cutting_tool.type</field>
<field name="inherit_id" ref="sf_base.form_sf_cutting_tool_type"/>
<field name="arch" type="xml">
<xpath expr="//form//group" position="after">
<group string='刀具寿命'>
<group>
<field name="total_cut_time"/>
<field name="tool_position"/>
</group>
<group>
<field name="predict_life_time"/>
<!-- 刀具寿命 -->
<!-- <record id="view_cutting_tool_inherited" model="ir.ui.view"> -->
<!-- <field name="name">sf_cutting_tool_extension</field> -->
<!-- <field name="model">sf.cutting_tool.type</field> -->
<!-- <field name="inherit_id" ref="sf_base.form_sf_machine_tool_type"/> -->
<!-- <field name="arch" type="xml"> -->
<!-- <xpath expr="//form//group" position="after"> -->
<!-- <group string='刀具寿命'> -->
<!-- <group> -->
<!-- <field name="total_cut_time"/> -->
<!-- <field name="tool_position"/> -->
</group>
<!-- </group> -->
<!-- <group> -->
<!-- <field name="predict_life_time"/> -->
<div>
<!-- </group> -->
<div>
<field name='is_connect_tool_position' invisible='1'/>
<button string="绑定刀位" name="tool_connect_machine" type="object" confirm="是否确认绑定此刀位"
class="btn-primary"/>
<!-- <div> -->
<!-- <div> -->
<!-- <field name='is_connect_tool_position' invisible='1'/> -->
<!-- <button string="绑定刀位" name="tool_connect_machine" type="object" confirm="是否确认绑定此刀位" -->
<!-- class="btn-primary"/> -->
<!-- attrs='{"invisible": [("is_connect_tool_position","!=", -->
<!-- "False")]}' -->
<span>&#32;</span>
<button string="解绑刀位" name="tool_unconnect_machine" type="object" confirm="是否解绑此刀位"
class="btn-primary"/>
<!-- <span>&#32;</span> -->
<!-- <button string="解绑刀位" name="tool_unconnect_machine" type="object" confirm="是否解绑此刀位" -->
<!-- class="btn-primary"/> -->
<!-- attrs='{"invisible": [("is_connect_tool_position","!=", -->
<!-- "False")]}' -->
</div>
<!-- </div> -->
</div>
</group>
</xpath>
</field>
</record>
<!-- </div> -->
<!-- </group> -->
<!-- </xpath> -->
<!-- </field> -->
<!-- </record> -->
</odoo>