合并sf代码

This commit is contained in:
gqh
2023-01-11 14:51:59 +08:00
parent aba5a076b1
commit 8e51654f17
23 changed files with 547 additions and 621 deletions

View File

@@ -1,14 +0,0 @@
<?xml version="1.0"?>
<odoo>
<record id="view_order_form_scan_barcode" model="ir.ui.view">
<field name="name">sale.order.form.scan.barcode</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<!-- invisible="1" -->
<field name="_barcode_scanned" widget="barcode_handler"/>
</field>
</field>
</record>
</odoo>

View File

@@ -8,6 +8,7 @@
<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>

View File

@@ -11,12 +11,13 @@
<field name="compensation_value_y"/>
</group>
<div>
<field name="button_compensation_state"/>
<button string="一键补偿" name="compensation" type="object" confirm="是否确认下发补偿" class="btn-primary"/>
<!-- <button string="显示补偿" name="compensation1" type="object" confirm="是否确认下发补偿" class="btn-primary"/>-->
<!-- <button string="修改状态" name="get__state" type="object" class="btn-primary"/>-->
</div>
</xpath>
<!-- attrs='{"invisible": [("routing_type","!=","CNC加工")]}'-->
</field>
</record>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="flush">
&lt;!DOCTYPE html&gt;
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>World Map</title>
<script type="text/javascript">
$(function () {
setInterval(function () {
$("#map").load(location.href + " #map>*", "");//注意后面DIV的ID前面的空格跟 id 后的>*,很重要!
}, 1000);//8秒自动刷新
})
</script>
</head>
<body>
</body>
</html>
</template>
</odoo>

View File

@@ -9,8 +9,9 @@
<field name="inherit_id" ref="sf_manufacturing.view_mrp_production_workorder_tray_form_inherit_sf"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='remark']" position="after">
<button string="测试按钮" name="pri" type="object" class="btn-primary"/>
<button string="下发按钮" name="up" type="object" confirm="是否确认下发此程序" class="btn-primary"/>
<!-- <button string="测试按钮" name="pri" type="object" class="btn-primary"/>-->
<field name="button_state"/>
<button string="下发按钮" name="up" type="object" class="btn-primary" confirm="是否确认下发此程序"/>
</xpath>
</field>

View File

@@ -4,40 +4,99 @@
<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="inherit_id" ref="sf_base.form_mrs_machine_tool_type"/>-->
<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="//page[@name='other']" position="before">-->
<!-- <page string="监控页面">-->
<group string="监控">
<field name="timestamp"/>
<field name="signed"/>
<field name="status"/>
<!-- <field name="tool_num"/>-->
<field name="time_on"/>
<field name="time_on_now"/>
<field name="run_status"/>
<field name="run_time"/>
<field name="cut_status"/>
<!-- <field name="cut_time"/>-->
<field name="program"/>
<field name="tool_num"/>
<!-- <div class="o_address_format">-->
<!-- <label for="tool_num_process_time1" string="刀位1"/>-->
<!-- <field name="tool_num_process_time1" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time2" string="刀位1"/>-->
<!-- <field name="tool_num_process_time2" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time3" string="刀位1"/>-->
<!-- <field name="tool_num_process_time3" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time4" string="刀位1"/>-->
<!-- <field name="tool_num_process_time4" class="o_form_label"/>-->
<!-- <div></div>-->
<!-- <label for="tool_num_process_time5" string="刀位1"/>-->
<!-- <field name="tool_num_process_time5" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time6" string="刀位1"/>-->
<!-- <field name="tool_num_process_time6" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time7" string="刀位1"/>-->
<!-- <field name="tool_num_process_time7" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time8" string="刀位1"/>-->
<!-- <field name="tool_num_process_time8" class="o_form_label"/>-->
<!-- <div></div>-->
<!-- <label for="tool_num_process_time9" string="刀位1"/>-->
<!-- <field name="tool_num_process_time9" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time10" string="刀位1"/>-->
<!-- <field name="tool_num_process_time10" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time11" string="刀位1"/>-->
<!-- <field name="tool_num_process_time11" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time12" string="刀位1"/>-->
<!-- <field name="tool_num_process_time12" class="o_form_label"/>-->
<!-- <div></div>-->
<!-- <label for="tool_num_process_time13" string="刀位1"/>-->
<!-- <field name="tool_num_process_time13" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time14" string="刀位1"/>-->
<!-- <field name="tool_num_process_time14" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time15" string="刀位1"/>-->
<!-- <field name="tool_num_process_time15" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time16" string="刀位1"/>-->
<!-- <field name="tool_num_process_time16" class="o_form_label"/>-->
<!-- <div></div>-->
<!-- <label for="tool_num_process_time17" string="刀位1"/>-->
<!-- <field name="tool_num_process_time17" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time18" string="刀位1"/>-->
<!-- <field name="tool_num_process_time18" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time19" string="刀位1"/>-->
<!-- <field name="tool_num_process_time19" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time20" string="刀位1"/>-->
<!-- <field name="tool_num_process_time20" class="o_form_label"/>-->
<!-- <div></div>-->
<!-- <label for="tool_num_process_time21" string="刀位1"/>-->
<!-- <field name="tool_num_process_time21" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time22" string="刀位1"/>-->
<!-- <field name="tool_num_process_time22" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time23" string="刀位1"/>-->
<!-- <field name="tool_num_process_time23" class="o_form_label"/>-->
<!-- <span>&amp;nbsp;</span>-->
<!-- <label for="tool_num_process_time24" string="刀位1"/>-->
<!-- <field name="tool_num_process_time24" class="o_form_label"/>-->
<!-- </div>-->
</group>
<!-- </page>-->
</xpath>
</field>
</record>
</odoo>
<!--&lt;!&ndash;继承了本模块的视图&ndash;&gt;-->
<!--<?xml version="1.0" encoding="utf-8"?>-->
<!--<odoo>-->
<!-- <record id="view_tree_mrs_machine_tool_inherited" model="ir.ui.view">-->
<!-- <field name="name">sf_base_extension</field>-->
<!-- <field name="model">ftp.client</field>-->
<!-- <field name="inherit_id" ref="ftp_form"/>-->
<!-- <field eval="20" name="priority"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <xpath expr="//field[@name='name']" position="before">-->
<!-- <field name="count_books"/>-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
<!--</odoo>-->

View File

@@ -1,25 +0,0 @@
<record id="view_purchase_order_barcode_inherit_form" model="ir.ui.view">
<field name="name">purchase.order.form</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<form position="inside">
<field name="_barcode_scanned" widget="purchaseorder_barcode_handler"/>
</form>
<xpath expr="//field[@name='order_line']/tree" position="inside">
<field name="product_barcode" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/kanban" position="inside">
<field name="product_barcode" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']//field[@name='product_qty']" position="attributes">
<attribute name="options">{'barcode_events': True}</attribute>
<attribute name="widget">field_float_scannable</attribute>
</xpath>
<xpath expr="//button[@name='button_confirm']" position="attributes">
<attribute name="barcode_trigger">validate</attribute>
</xpath>
</field>
</record>

View File

@@ -1,176 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Menus -->
<menuitem
id="ftp_menu_root"
name="sf2machine"
web_icon="iot,static/description/icon.png"
groups="base.group_system"
/>
IoT Boxes
<record model="ir.ui.view" id="data_list">
<field name="model">ftp.client</field>
<field name="arch" type="xml">
<!-- <div id="map">-->
<tree string="目标">
<field name="name"/>
<field name="mobile"/>
<field name="description"/>
</tree>
<!-- </div>-->
</field>
</record>
<record model="ir.ui.view" id="barcode_list">
<field name="model">mrp.production</field>
<field name="arch" type="xml">
<!-- <div id="map">-->
<tree string="目标">
<field name="_barcode_scanned" widget="barcode_handler"/>
<field name="aa"/>
</tree>
<!-- </div>-->
</field>
</record>
<record model="ir.ui.view" id="ftp_form">
<field name="model">ftp.client</field>
<field name="arch" type="xml">
<form string="数据采集">
<group string="基本信息">
<group>
<field name="name"/>
<field name="mobile"/>
<field name="description"/>
<field name="_barcode_scanned" widget="barcode_handler"/>
<!-- <button string="测试按钮" name="pri" type="object"/>-->
<button string="下发程序" name="up" type="object" data-hotkey="enter"/>
<button string="扫码" name="on_barcode_scanned" type="object"/>
<!-- <button string="删除程序" name="delete" type="object"/>-->
<templates xml:space="preserve">
<t t-name="web.Many2OneField" owl="1">
<button t-on-click="onBarcodeBtnClick"
type="button"
class="btn ms-3 o_barcode"
tabindex="-1"
draggable="false"
aria-label="Scan barcode"
title="Scan barcode"
data-tooltip="Scan barcode"
>saomiao</button>
</t>
</templates>
</group>
</group>
</form>
</field>
</record>
<record model="ir.ui.view" id="barcode_form">
<field name="model">mrp.production</field>
<field name="arch" type="xml">
<form string="扫码">
<group string="基本信息">
<field name="_barcode_scanned" widget="barcode_handler"/>
<field name="aa"/>
</group>
</form>
</field>
</record>
<record id="ftp_action" model="ir.actions.act_window">
<field name="name">数据采集</field>
<field name="res_model">ftp.client</field>
<field name="view_mode">list,form,kanban</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
这是我们的数据采集与程序管理页面!
</p>
</field>
</record>
<record id="barcode_action" model="ir.actions.act_window">
<field name="name">扫码</field>
<field name="res_model">mrp.production</field>
<field name="view_mode">list,form,kanban</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
这是我们的扫码页面!
</p>
</field>
</record>
<menuitem
id="ftp_data_menu_action"
name="数据采集"
action="ftp_action"
parent="ftp_menu_root"
sequence="1"/>
<menuitem
id="ftp_cnc_data_menu_action"
name="CNC"
action="ftp_action"
parent="ftp_data_menu_action"
sequence="1"/>
<!-- <menuitem-->
<!-- id="ftp_mit_cnc_data_menu_action"-->
<!-- name="三菱CNC"-->
<!-- action="ftp_action"-->
<!-- parent="ftp_cnc_data_menu_action"-->
<!-- sequence="1"/>-->
<!-- <menuitem-->
<!-- id="ftp_sim_cnc_data_menu_action"-->
<!-- name="西门子CNC"-->
<!-- action="ftp_action"-->
<!-- parent="ftp_cnc_data_menu_action"-->
<!-- sequence="1"/>-->
<!-- <menuitem-->
<!-- id="ftp_fan_cnc_data_menu_action"-->
<!-- name="发那科CNC"-->
<!-- action="ftp_action"-->
<!-- parent="ftp_cnc_data_menu_action"-->
<!-- sequence="1"/>-->
<menuitem
id="ftp_plc_data_menu_action"
name="PLC"
action="ftp_action"
parent="ftp_data_menu_action"
sequence="3"/>
<menuitem
id="ftp_instrument_data_menu_action"
name="仪器仪表"
action="ftp_action"
parent="ftp_data_menu_action"
sequence="9"/>
<menuitem
id="ftp_procedure_menu_action"
name="程序管理"
action="barcode_action"
parent="ftp_menu_root"
sequence="2"/>
<menuitem
id="ftp_up_menu_action"
name="本地代码"
action="ftp_action"
parent="ftp_procedure_menu_action"
sequence="2"/>
<menuitem
id="ftp_down_menu_action"
name="机床代码"
action="ftp_action"
parent="ftp_procedure_menu_action"
sequence="6"/>
</odoo>

View File

@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sale_order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.form.inherit</field>
<field name="model">sf.machine_tool</field>
<field name="inherit_id" ref="sf_base.sf_machine_tool_form"/>
<field name="arch" type="xml">
<xpath expr="//form//notebook//page[1]" position="inside">
<group string="监控">
<field name="timestamp"/>
<field name="signed"/>
<field name="signed16"/>
<field name="pulse2"/>
<field name="tool_num"/>
<field name="program"/>
</group>
<!-- </page>-->
<div class="o_partner_order_summary" colspan="2"/>
</xpath>
<!-- <field name="payment_term_id" position="after">-->
<!-- <field name="create_date" widget="show_units" options="{'units':'UTC'}"/>-->
<!-- -->
<!-- </field>-->
</field>
</record>
</odoo>
<!--<?xml version="1.0" encoding="utf-8"?>-->
<!--<odoo>-->
<!-- <record id="sale_order_form_inherit" model="ir.ui.view">-->
<!-- <field name="name">sale.order.form.inherit</field>-->
<!-- <field name="model">sale.order</field>-->
<!-- <field name="inherit_id" ref="sale.view_order_form"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <field name="payment_term_id" position="after">-->
<!-- <field name="create_date" widget="show_units" options="{'units':'UTC'}"/>-->
<!-- <div class="o_partner_order_summary" colspan="2"/>-->
<!-- </field>-->
<!-- </field>-->
<!-- </record>-->
<!--</odoo>-->

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sf_install_the_tray_workorder_form_view_inherit" model="ir.ui.view">
<field name="name">sale.order.form.inherit</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">
<field name="tray_code" position="before">
<!-- <field name="create_date" widget="show_units" options="{'units':'UTC'}"/>-->
<div class="o_partner_order_summary" colspan="2"/>
<!-- <field name="aa"/>-->
</field>
</field>
</record>
</odoo>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mrp_workcenter_view_kanban_inherit_workorder_inherit" model="ir.ui.view">
<field name="name">mrp.workcenter.view.kanban.inherit.mrpworkorder</field>
<field name="model">mrp.workcenter</field>
<!-- <field name="model">cnc.processing</field>-->
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_work_order']" position="after">
<!-- <field name="aaaa"/>-->
<button string="扫码查询" name="search_order" type="object" class="btn-primary"/>
</xpath>
</field>
</record>
</odoo>