优化代码-设置按钮权限等
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="sf_install_the_tray_workorder_form_view__scan_barcode" model="ir.ui.view">
|
||||
<field name="name">sf.install.the.tray.workorder.form.scan.barcode</field>
|
||||
@@ -8,7 +8,6 @@
|
||||
<xpath expr="//page//field[@name='tray_code']" position="before">
|
||||
<!-- invisible="1" -->
|
||||
<field name="_barcode_scanned" widget="barcode_handler"/>
|
||||
<field name="tray_code" widget="code"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
|
||||
@@ -11,12 +11,26 @@
|
||||
<field name="compensation_value_y"/>
|
||||
</group>
|
||||
<div>
|
||||
<field name="button_compensation_state"/>
|
||||
<button string="一键补偿" name="compensation" type="object" confirm="是否确认下发补偿" class="btn-primary"/>
|
||||
<div>
|
||||
<field name="button_compensation_state"/>
|
||||
<button string="一键补偿" name="compensation" type="object" confirm="是否确认下发补偿"
|
||||
class="btn-primary" 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)]}'/>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <button string="显示补偿" name="compensation1" type="object" confirm="是否确认下发补偿" class="btn-primary"/>-->
|
||||
<!-- <button string="修改状态" name="get__state" type="object" class="btn-primary"/>-->
|
||||
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <button string="一键下发" name="up_all" type="object" confirm="是否确认一键下发"-->
|
||||
<!-- class="btn-primary" attrs='{"invisible": ["|",-->
|
||||
<!-- ("state","!=","progress"),("user_permissions","=",False)]}'/>-->
|
||||
<!-- </div>-->
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
|
||||
@@ -10,8 +10,17 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='remark']" position="after">
|
||||
<!-- <button string="测试按钮" name="pri" type="object" class="btn-primary"/>-->
|
||||
<!-- <field name="workorder_id" invisible="1"/>-->
|
||||
<field name="button_state"/>
|
||||
<button string="下发按钮" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"/>
|
||||
<field name="user_permissions" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"
|
||||
attrs='{"invisible": ["|",("state","!=","progress"),
|
||||
("user_permissions","!=",True)]}'/>
|
||||
<!-- <button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"/>-->
|
||||
<!-- <button string="下发" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"-->
|
||||
<!-- />-->
|
||||
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
19
sf_machine_connect/views/machine_info_present.xml
Normal file
19
sf_machine_connect/views/machine_info_present.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_machine_info_form_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">machine.info.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()]" position="after">
|
||||
<page string="机床信息" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
||||
<group>
|
||||
<field name="machine_tool_id">
|
||||
</field>
|
||||
<!-- <field name="cnc_ids" widget="one2many" string="工作程序"></field>-->
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -9,7 +9,10 @@
|
||||
<!-- <xpath expr="//field[@name='knife_type']" position="before">-->
|
||||
<xpath expr="//form//notebook//page[1]" position="inside">
|
||||
<!-- <xpath expr="//page[@name='other']" position="before">-->
|
||||
<group string="监控">
|
||||
<notebook>
|
||||
<page string="机床监控">
|
||||
<!-- <group string="监控">-->
|
||||
<group>
|
||||
<field name="timestamp"/>
|
||||
<field name="signed"/>
|
||||
<field name="status"/>
|
||||
@@ -95,6 +98,29 @@
|
||||
<!-- <field name="tool_num_process_time24" class="o_form_label"/>-->
|
||||
<!-- </div>-->
|
||||
</group>
|
||||
</page>
|
||||
<page string="机床配置">
|
||||
<!-- <group string="机床配置">-->
|
||||
<group>
|
||||
<group string="ftp相关">
|
||||
<field name="ftp_num"/>
|
||||
<field name="ftp_pwd"/>
|
||||
<field name="ftp_host"/>
|
||||
<field name="ftp_port"/>
|
||||
</group>
|
||||
<group string="补偿值相关">
|
||||
<field name="x_compensation_node"/>
|
||||
<field name="y_compensation_node"/>
|
||||
</group>
|
||||
<group string="数采相关">
|
||||
<field name="machine_ip"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user