Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/刀具产品调取Cloud刀具标准库(10.11)
# Conflicts: # sf_sale/models/quick_easy_order.py
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
'jikimo_frontend/static/src/views/list_nums/list_nums.xml',
|
||||
'jikimo_frontend/static/src/views/list_nums/list_nums2.xml',
|
||||
'jikimo_frontend/static/src/views/list_nums/list_nums3.xml',
|
||||
'jikimo_frontend/static/src/js/custom_form_status_indicator.js',
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import {patch} from '@web/core/utils/patch';
|
||||
// import { Dialog } from "@web/core/dialog/dialog";
|
||||
import {_t} from "@web/core/l10n/translation";
|
||||
import {FormStatusIndicator} from "@web/views/form/form_status_indicator/form_status_indicator"
|
||||
|
||||
var Dialog = require('web.Dialog');
|
||||
// var {patch} = require("web.utils") 这句话也行
|
||||
|
||||
patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
|
||||
// 你可以重写或者添加一些方法和属性
|
||||
async _onDiscardChanges() {
|
||||
var self = this;
|
||||
Dialog.confirm(this, _t("Are you sure you want to discard changes?"), {
|
||||
title: _t("Discard Changes"),
|
||||
|
||||
// confirm_callback: function () {
|
||||
// self.model.discardChanges(self.handle);
|
||||
// },
|
||||
});
|
||||
},
|
||||
|
||||
async discard() {
|
||||
// if (window.confirm("Are you sure you want to discard changes?")) {
|
||||
// await this.props.discard();
|
||||
// }
|
||||
const result = await this._confirmDiscardChange();
|
||||
await this.props.discard();
|
||||
},
|
||||
|
||||
_confirmDiscardChange(){
|
||||
var self = this;
|
||||
var def = new Promise(function (resolve, reject) {
|
||||
var message = _t("请确认是否要舍弃之前的更改?");
|
||||
var dialog = Dialog.confirm(self, message, {
|
||||
title: _t("Warning"),
|
||||
confirm_callback: resolve.bind(self, true),
|
||||
cancel_callback: reject,
|
||||
});
|
||||
dialog.on('closed', self, reject);
|
||||
});
|
||||
return def;
|
||||
},
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
""",
|
||||
'category': 'sf',
|
||||
'website': 'https://www.sf.jikimo.com',
|
||||
'depends': ['account', 'base', 'mrp_workorder', 'sale'],
|
||||
'depends': ['account', 'base', 'mrp_workorder', 'sale', 'purchase'],
|
||||
'data': [
|
||||
'security/group_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
@@ -84,6 +84,29 @@
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- 移除字段属性 -->
|
||||
<record id="view_order_form_inherited" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.inherited</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='order_line']" position="attributes">
|
||||
<attribute name="widget"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_purchase_form_inherited" model="ir.ui.view">
|
||||
<field name="name">purchase.order.form.inherited</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='order_line']" position="attributes">
|
||||
<attribute name="widget"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!-- <record id="mrp_workorder.menu_mrp_workorder_workcenter" model="ir.ui.menu"> -->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import logging
|
||||
from odoo.modules import get_resource_path
|
||||
from odoo import fields, models, api
|
||||
# from quatotion import readSql, feature_recognize, auto_quatotion
|
||||
from quatotion import readSql, feature_recognize, auto_quatotion
|
||||
|
||||
__author__ = 'jinling.yang'
|
||||
_logger = logging.getLogger(__name__)
|
||||
@@ -24,14 +24,14 @@ class AutoQuatotion(models.Model):
|
||||
def get_process_time_db_path(self):
|
||||
return get_resource_path('sf_sale', 'models', 'process_time.db')
|
||||
|
||||
# def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
||||
# '''
|
||||
# 通过打包好的.so库,
|
||||
# 以调用autoQuatotion库中Quatotion类,
|
||||
# 初始化后调用类的analyseShape方法对模型文件进行价格预测
|
||||
# '''
|
||||
# # 初始化自动报价类(输入特征数据库和加工时间数据库)
|
||||
# reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
||||
# # 获取价格、加工时间、尺寸、XYZ、翻面次数
|
||||
# feature_info = reader.analyseShape(stp_url, InfoJson={})
|
||||
# return feature_info
|
||||
def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
||||
'''
|
||||
通过打包好的.so库,
|
||||
以调用autoQuatotion库中Quatotion类,
|
||||
初始化后调用类的analyseShape方法对模型文件进行价格预测
|
||||
'''
|
||||
# 初始化自动报价类(输入特征数据库和加工时间数据库)
|
||||
reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
||||
# 获取价格、加工时间、尺寸、XYZ、翻面次数
|
||||
feature_info = reader.analyseShape(stp_url, InfoJson={})
|
||||
return feature_info
|
||||
|
||||
@@ -82,17 +82,19 @@ class QuickEasyOrder(models.Model):
|
||||
# logging.info('create-model_file:%s' % len(vals['model_file']))
|
||||
|
||||
obj = super(QuickEasyOrder, self).create(vals)
|
||||
self.model_coloring(obj)
|
||||
# self.model_coloring(obj)
|
||||
self.distribute_to_factory(obj)
|
||||
obj.state = '待接单'
|
||||
return obj
|
||||
|
||||
# 将attach的datas内容转为glb文件
|
||||
def transition_glb_file(self, report_path, model_code):
|
||||
# shapes = read_step_file(report_path)
|
||||
shapes = read_step_file(report_path)
|
||||
# output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl')
|
||||
output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
||||
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||
# output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl')
|
||||
output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
||||
# write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||
# 转化为glb
|
||||
# output_glb_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.glb')
|
||||
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
||||
@@ -122,17 +124,17 @@ class QuickEasyOrder(models.Model):
|
||||
model_code = hashlib.sha1(base64_datas.encode('utf-8')).hexdigest()
|
||||
logging.info("模型编码: %s" % model_code)
|
||||
item.model_file = self.transition_glb_file(report_path, model_code)
|
||||
ret = self.feature_recognition(report_path, model_code)
|
||||
logging.info("自动报价返回值: %s" % ret)
|
||||
boxshape = ret['boxshape'].tolist()
|
||||
logging.info("自动报价boxshape: %s" % boxshape)
|
||||
logging.info('自动报价feature_infos:%s' % ret['feature_infos'])
|
||||
item.model_length = boxshape[0] # 长 单位mm
|
||||
item.model_width = boxshape[1] # 宽
|
||||
item.model_height = boxshape[2] # 高
|
||||
item.model_volume = boxshape[0] * boxshape[1] * boxshape[2]
|
||||
item.model_feature = json.dumps(ret['feature_infos'], ensure_ascii=False)
|
||||
self._get_price(item)
|
||||
# ret = self.feature_recognition(report_path, model_code)
|
||||
# logging.info("自动报价返回值: %s" % ret)
|
||||
# boxshape = ret['boxshape'].tolist()
|
||||
# logging.info("自动报价boxshape: %s" % boxshape)
|
||||
# logging.info('自动报价feature_infos:%s' % ret['feature_infos'])
|
||||
# item.model_length = boxshape[0] # 长 单位mm
|
||||
# item.model_width = boxshape[1] # 宽
|
||||
# item.model_height = boxshape[2] # 高
|
||||
# item.model_volume = boxshape[0] * boxshape[1] * boxshape[2]
|
||||
# item.model_feature = json.dumps(ret['feature_infos'], ensure_ascii=False)
|
||||
# self._get_price(item)
|
||||
else:
|
||||
item.model_file = False
|
||||
item.model_feature = False
|
||||
|
||||
@@ -752,40 +752,38 @@ class FunctionalToolAssembly(models.Model):
|
||||
functional_tool_cutting_type = fields.Char(string='功能刀具切削类型', readonly=False)
|
||||
|
||||
# 整体式刀具型号
|
||||
cutting_tool_integral_model_id = fields.Many2one('product.product', string='整体式刀具型号', readonly=True,
|
||||
domain=[('cutting_tool_material_id', '=', '整体式刀具')])
|
||||
integral_code = fields.Char('整体式刀具序列号', readonly=True)
|
||||
integral_code_id = fields.Many2one('stock.lot', string='整体式刀具序列号', readonly=True)
|
||||
cutting_tool_integral_model_id = fields.Many2one('sf.cutting.tool.material', string='整体式刀具型号', readonly=True)
|
||||
integral_name = fields.Char('整体式刀具名称', readonly=True)
|
||||
sf_tool_brand_id_1 = fields.Many2one('sf.machine.brand', '整体式刀具品牌', readonly=True, domain="[('tag_ids.name', 'ilike', '刀具')]")
|
||||
sf_tool_brand_id_1 = fields.Many2one('sf.machine.brand', string='整体式刀具品牌', readonly=True)
|
||||
|
||||
# 刀片型号
|
||||
cutting_tool_blade_model_id = fields.Many2one('product.product', string='刀片型号', readonly=True,
|
||||
domain=[('cutting_tool_material_id', '=', '刀片')])
|
||||
blade_code = fields.Char('刀片序列号', readonly=True)
|
||||
blade_code_id = fields.Many2one('stock.lot', '刀片序列号', readonly=True)
|
||||
cutting_tool_blade_model_id = fields.Many2one('sf.cutting.tool.material', string='刀片型号', readonly=True)
|
||||
blade_name = fields.Char('刀片名称', readonly=True)
|
||||
sf_tool_brand_id_2 = fields.Many2one('sf.machine.brand', '刀片品牌', readonly=True)
|
||||
|
||||
# 刀杆型号
|
||||
cutting_tool_cutterbar_model_id = fields.Many2one('product.product', string='刀杆型号', readonly=True,
|
||||
domain=[('cutting_tool_material_id', '=', '刀杆')])
|
||||
bar_code = fields.Char('刀杆序列号', readonly=True)
|
||||
bar_code_id = fields.Many2one('stock.lot', '刀杆序列号', readonly=True)
|
||||
cutting_tool_cutterbar_model_id = fields.Many2one('sf.cutting.tool.material', string='刀杆型号', readonly=True)
|
||||
bar_name = fields.Char('刀杆名称', readonly=True)
|
||||
sf_tool_brand_id_3 = fields.Many2one('sf.machine.brand', '刀杆品牌', readonly=True)
|
||||
|
||||
# 刀盘型号
|
||||
cutting_tool_cutterpad_model_id = fields.Many2one('product.product', string='刀盘型号', readonly=True,
|
||||
domain=[('cutting_tool_material_id', '=', '刀盘')])
|
||||
pad_code = fields.Char('刀盘序列号', readonly=True)
|
||||
pad_code_id = fields.Many2one('stock.lot', '刀盘序列号', readonly=True)
|
||||
cutting_tool_cutterpad_model_id = fields.Many2one('sf.cutting.tool.material', string='刀盘型号', readonly=True)
|
||||
pad_name = fields.Char('刀盘名称', readonly=True)
|
||||
sf_tool_brand_id_4 = fields.Many2one('sf.machine.brand', '刀盘品牌', readonly=True)
|
||||
|
||||
# 刀柄型号
|
||||
cutting_tool_cutterhandle_model_id = fields.Many2one('product.product', string='刀柄型号', readonly=True,
|
||||
domain=[('cutting_tool_material_id', '=', '刀柄')])
|
||||
handle_code = fields.Char('刀柄序列号', readonly=True)
|
||||
handle_code_id = fields.Many2one('stock.lot', '刀柄序列号', readonly=True)
|
||||
cutting_tool_cutterhandle_model_id = fields.Many2one('sf.cutting.tool.material', string='刀柄型号', readonly=True)
|
||||
handle_name = fields.Char('刀柄名称', readonly=True)
|
||||
sf_tool_brand_id_5 = fields.Many2one('sf.machine.brand', '刀柄品牌', readonly=True)
|
||||
|
||||
# 夹头型号
|
||||
cutting_tool_cutterhead_model_id = fields.Many2one('product.product', string='夹头型号', readonly=True,
|
||||
domain=[('cutting_tool_material_id', '=', '夹头')])
|
||||
chuck_code = fields.Char('夹头序列号', readonly=True)
|
||||
chuck_code_id = fields.Many2one('stock.lot', '夹头序列号', readonly=True)
|
||||
cutting_tool_cutterhead_model_id = fields.Many2one('sf.cutting.tool.material', string='夹头型号', readonly=True)
|
||||
chuck_name = fields.Char('夹头名称', readonly=True)
|
||||
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', readonly=True)
|
||||
|
||||
|
||||
@@ -1106,6 +1106,8 @@
|
||||
|
||||
<notebook>
|
||||
<page string="组装信息">
|
||||
<group col="1">
|
||||
<group col="1">
|
||||
<group>
|
||||
<group>
|
||||
<field name="coarse_middle_thin"/>
|
||||
@@ -1119,60 +1121,178 @@
|
||||
<field name="cut_number"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="cutting_tool_integral_model_id" options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible':[('cutting_tool_integral_model_id', '=', False)]}"/>
|
||||
<field name="integral_code"
|
||||
attrs="{'invisible':[('cutting_tool_integral_model_id', '=', False)]}"/>
|
||||
<field name="cutting_tool_blade_model_id" options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible':[('cutting_tool_blade_model_id', '=', False)]}"/>
|
||||
<field name="blade_code"
|
||||
attrs="{'invisible':[('cutting_tool_blade_model_id', '=', False)]}"/>
|
||||
<field name="cutting_tool_cutterbar_model_id" options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible':[('cutting_tool_cutterbar_model_id', '=', False)]}"/>
|
||||
<field name="bar_code"
|
||||
attrs="{'invisible':[('cutting_tool_cutterbar_model_id', '=', False)]}"/>
|
||||
<field name="cutting_tool_cutterpad_model_id" options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible':[('cutting_tool_cutterpad_model_id', '=', False)]}"/>
|
||||
<field name="pad_code"
|
||||
attrs="{'invisible':[('cutting_tool_cutterpad_model_id', '=', False)]}"/>
|
||||
<field name="cutting_tool_cutterhandle_model_id" options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhandle_model_id', '=', False)]}"/>
|
||||
<field name="handle_code"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhandle_model_id', '=', False)]}"/>
|
||||
<field name="cutting_tool_cutterhead_model_id" options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhead_model_id', '=', False)]}"/>
|
||||
<field name="chuck_code"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhead_model_id', '=', False)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="integral_name"
|
||||
attrs="{'invisible':[('cutting_tool_integral_model_id', '=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_1"
|
||||
attrs="{'invisible':[('cutting_tool_integral_model_id', '=', False)]}"/>
|
||||
<field name="blade_name"
|
||||
attrs="{'invisible':[('cutting_tool_blade_model_id', '=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_2"
|
||||
attrs="{'invisible':[('cutting_tool_blade_model_id', '=', False)]}"/>
|
||||
<field name="bar_name"
|
||||
attrs="{'invisible':[('cutting_tool_cutterbar_model_id', '=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_3"
|
||||
attrs="{'invisible':[('cutting_tool_cutterbar_model_id', '=', False)]}"/>
|
||||
<field name="pad_name"
|
||||
attrs="{'invisible':[('cutting_tool_cutterpad_model_id', '=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_4"
|
||||
attrs="{'invisible':[('cutting_tool_cutterpad_model_id', '=', False)]}"/>
|
||||
<field name="handle_name"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhandle_model_id', '=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_5"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhandle_model_id', '=', False)]}"/>
|
||||
<field name="chuck_name"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhead_model_id', '=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_6"
|
||||
attrs="{'invisible':[('cutting_tool_cutterhead_model_id', '=', False)]}"/>
|
||||
<group col="1">
|
||||
<group col="1" attrs="{'invisible': [('integral_code_id', '=', False)]}">
|
||||
<div>
|
||||
<separator string="整体式刀具:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="integral_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="integral_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_integral_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_1" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group col="1">
|
||||
<group col="1" attrs="{'invisible': [('blade_code_id', '=', False)]}">
|
||||
<div>
|
||||
<separator string="刀片:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="blade_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="blade_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_blade_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_2" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1">
|
||||
<div>
|
||||
<separator string="刀柄:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="handle_code_id" string="序列号" placeholder="请选择"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="handle_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterhandle_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_5" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1">
|
||||
<group col="1" attrs="{'invisible': [('bar_code_id', '=', False)]}">
|
||||
<div>
|
||||
<separator string="刀杆:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="bar_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="bar_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterbar_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_3" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1" attrs="{'invisible': [('pad_code_id', '=', False)]}">
|
||||
<div>
|
||||
<separator string="刀盘:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="pad_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="pad_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterpad_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_4" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1">
|
||||
<div>
|
||||
<separator string="夹头:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="chuck_code_id" string="序列号" placeholder="请选择"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="chuck_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterhead_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_6" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<!-- <group>-->
|
||||
<!-- <field name="integral_code_id"/>-->
|
||||
<!-- <field name="cutting_tool_integral_model_id"/>-->
|
||||
<!-- <field name="blade_code_id"/>-->
|
||||
<!-- <field name="cutting_tool_blade_model_id"/>-->
|
||||
<!-- <field name="bar_code_id"/>-->
|
||||
<!-- <field name="cutting_tool_cutterbar_model_id"/>-->
|
||||
<!-- <field name="pad_code_id"/>-->
|
||||
<!-- <field name="cutting_tool_cutterpad_model_id"/>-->
|
||||
<!-- <field name="handle_code_id"/>-->
|
||||
<!-- <field name="cutting_tool_cutterhandle_model_id"/>-->
|
||||
<!-- <field name="chuck_code_id"/>-->
|
||||
<!-- <field name="cutting_tool_cutterhead_model_id"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="integral_name"/>-->
|
||||
<!-- <field name="sf_tool_brand_id_1"/>-->
|
||||
<!-- <field name="blade_name"/>-->
|
||||
<!-- <field name="sf_tool_brand_id_2"/>-->
|
||||
<!-- <field name="bar_name"/>-->
|
||||
<!-- <field name="sf_tool_brand_id_3"/>-->
|
||||
<!-- <field name="pad_name"/>-->
|
||||
<!-- <field name="sf_tool_brand_id_4"/>-->
|
||||
<!-- <field name="handle_name"/>-->
|
||||
<!-- <field name="sf_tool_brand_id_5"/>-->
|
||||
<!-- <field name="chuck_name"/>-->
|
||||
<!-- <field name="sf_tool_brand_id_6"/>-->
|
||||
<!-- </group>-->
|
||||
</group>
|
||||
</page>
|
||||
<page string="申请信息">
|
||||
<group>
|
||||
|
||||
@@ -118,6 +118,7 @@ class ToolTransferRequestInformation(models.TransientModel):
|
||||
|
||||
class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
_name = 'sf.functional.tool.assembly.order'
|
||||
_inherit = ["barcodes.barcode_events_mixin"]
|
||||
_description = '功能刀具组装单'
|
||||
|
||||
# 功能刀具申请信息
|
||||
@@ -137,196 +138,123 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
|
||||
# 功能刀具组装信息
|
||||
# 整体式刀具型号
|
||||
cutting_tool_integral_model_id = fields.Many2one('product.product', string='整体式刀具型号', readonly=False,
|
||||
domain=[('cutting_tool_material_id', '=', '整体式刀具')])
|
||||
integral_code = fields.Char('整体式刀具序列号', readonly=True, compute='_compute_integral_code')
|
||||
integral_name = fields.Char('整体式刀具名称', readonly=True, compute='_compute_integral_name')
|
||||
sf_tool_brand_id_1 = fields.Many2one('sf.machine.brand', '整体式刀具品牌', readonly=True,
|
||||
compute='_compute_sf_tool_brand_id_1')
|
||||
|
||||
@api.depends('cutting_tool_integral_model_id')
|
||||
def _compute_integral_code(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_integral_model_id:
|
||||
self.integral_code = record.cutting_tool_integral_model_id.code
|
||||
else:
|
||||
self.integral_code = None
|
||||
|
||||
@api.depends('cutting_tool_integral_model_id')
|
||||
def _compute_integral_name(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_integral_model_id:
|
||||
self.integral_name = record.cutting_tool_integral_model_id.name
|
||||
else:
|
||||
self.integral_name = None
|
||||
|
||||
@api.depends('cutting_tool_integral_model_id')
|
||||
def _compute_sf_tool_brand_id_1(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_integral_model_id:
|
||||
self.sf_tool_brand_id_1 = record.cutting_tool_integral_model_id.brand_id.id
|
||||
else:
|
||||
self.sf_tool_brand_id_1 = None
|
||||
integral_code_id = fields.Many2one('stock.lot', string='整体式刀具序列号',
|
||||
domain=[('product_id.cutting_tool_material_id.name', '=', '整体式刀具')])
|
||||
cutting_tool_integral_model_id = fields.Many2one('sf.cutting.tool.material', string='整体式刀具型号', readonly=True)
|
||||
integral_name = fields.Char('整体式刀具名称', readonly=True)
|
||||
sf_tool_brand_id_1 = fields.Many2one('sf.machine.brand', string='整体式刀具品牌', readonly=True)
|
||||
|
||||
# 刀片型号
|
||||
cutting_tool_blade_model_id = fields.Many2one('product.product', string='刀片型号', readonly=False,
|
||||
domain=[('cutting_tool_material_id', '=', '刀片')])
|
||||
blade_code = fields.Char('刀片序列号', readonly=True, compute='_compute_blade_code')
|
||||
blade_name = fields.Char('刀片名称', readonly=True, compute='_compute_blade_name')
|
||||
sf_tool_brand_id_2 = fields.Many2one('sf.machine.brand', '刀片品牌', readonly=True,
|
||||
compute='_compute_sf_tool_brand_id_2')
|
||||
|
||||
@api.depends('cutting_tool_blade_model_id')
|
||||
def _compute_blade_code(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_blade_model_id:
|
||||
self.blade_code = self.cutting_tool_blade_model_id.code
|
||||
else:
|
||||
self.blade_code = None
|
||||
|
||||
@api.depends('cutting_tool_blade_model_id')
|
||||
def _compute_blade_name(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_blade_model_id:
|
||||
self.blade_name = self.cutting_tool_blade_model_id.name
|
||||
else:
|
||||
self.blade_name = None
|
||||
|
||||
@api.depends('cutting_tool_blade_model_id')
|
||||
def _compute_sf_tool_brand_id_2(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_blade_model_id:
|
||||
self.sf_tool_brand_id_2 = self.cutting_tool_blade_model_id.brand_id.id
|
||||
else:
|
||||
self.sf_tool_brand_id_2 = None
|
||||
blade_code_id = fields.Many2one('stock.lot', '刀片序列号',
|
||||
domain=[('product_id.cutting_tool_material_id.name', '=', '刀片')])
|
||||
cutting_tool_blade_model_id = fields.Many2one('sf.cutting.tool.material', string='刀片型号', readonly=True)
|
||||
blade_name = fields.Char('刀片名称', readonly=True)
|
||||
sf_tool_brand_id_2 = fields.Many2one('sf.machine.brand', '刀片品牌', readonly=True)
|
||||
|
||||
# 刀杆型号
|
||||
cutting_tool_cutterbar_model_id = fields.Many2one('product.product', string='刀杆型号', readonly=False,
|
||||
domain=[('cutting_tool_material_id', '=', '刀杆')])
|
||||
bar_code = fields.Char('刀杆序列号', readonly=True, compute='_compute_bar_code')
|
||||
bar_name = fields.Char('刀杆名称', readonly=True, compute='_compute_bar_name')
|
||||
sf_tool_brand_id_3 = fields.Many2one('sf.machine.brand', '刀杆品牌', readonly=True,
|
||||
compute='_compute_sf_tool_brand_id_3')
|
||||
|
||||
@api.depends('cutting_tool_cutterbar_model_id')
|
||||
def _compute_bar_code(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterbar_model_id:
|
||||
self.bar_code = self.cutting_tool_cutterbar_model_id.code
|
||||
else:
|
||||
self.bar_code = None
|
||||
|
||||
@api.depends('cutting_tool_cutterbar_model_id')
|
||||
def _compute_bar_name(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterbar_model_id:
|
||||
self.bar_name = self.cutting_tool_cutterbar_model_id.name
|
||||
else:
|
||||
self.bar_name = None
|
||||
|
||||
@api.depends('cutting_tool_cutterbar_model_id')
|
||||
def _compute_sf_tool_brand_id_3(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterbar_model_id:
|
||||
self.sf_tool_brand_id_3 = self.cutting_tool_cutterbar_model_id.brand_id.id
|
||||
else:
|
||||
self.sf_tool_brand_id_3 = None
|
||||
bar_code_id = fields.Many2one('stock.lot', '刀杆序列号',
|
||||
domain=[('product_id.cutting_tool_material_id.name', '=', '刀杆')])
|
||||
cutting_tool_cutterbar_model_id = fields.Many2one('sf.cutting.tool.material', string='刀杆型号', readonly=True)
|
||||
bar_name = fields.Char('刀杆名称', readonly=True)
|
||||
sf_tool_brand_id_3 = fields.Many2one('sf.machine.brand', '刀杆品牌', readonly=True)
|
||||
|
||||
# 刀盘型号
|
||||
cutting_tool_cutterpad_model_id = fields.Many2one('product.product', string='刀盘型号', readonly=False,
|
||||
domain=[('cutting_tool_material_id', '=', '刀盘')])
|
||||
pad_code = fields.Char('刀盘序列号', readonly=True, compute='_compute_pad_code')
|
||||
pad_name = fields.Char('刀盘名称', readonly=True, compute='_compute_pad_name')
|
||||
sf_tool_brand_id_4 = fields.Many2one('sf.machine.brand', '刀盘品牌', readonly=True,
|
||||
compute='_compute_sf_tool_brand_id_4')
|
||||
|
||||
@api.depends('cutting_tool_cutterpad_model_id')
|
||||
def _compute_pad_code(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterpad_model_id:
|
||||
self.pad_code = self.cutting_tool_cutterpad_model_id.code
|
||||
else:
|
||||
self.pad_code = None
|
||||
|
||||
@api.depends('cutting_tool_cutterpad_model_id')
|
||||
def _compute_pad_name(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterpad_model_id:
|
||||
self.pad_name = self.cutting_tool_cutterpad_model_id.name
|
||||
else:
|
||||
self.pad_name = None
|
||||
|
||||
@api.depends('cutting_tool_cutterpad_model_id')
|
||||
def _compute_sf_tool_brand_id_4(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterpad_model_id:
|
||||
self.sf_tool_brand_id_4 = self.cutting_tool_cutterpad_model_id.brand_id.id
|
||||
else:
|
||||
self.sf_tool_brand_id_4 = None
|
||||
pad_code_id = fields.Many2one('stock.lot', '刀盘序列号',
|
||||
domain=[('product_id.cutting_tool_material_id.name', '=', '刀盘')])
|
||||
cutting_tool_cutterpad_model_id = fields.Many2one('sf.cutting.tool.material', string='刀盘型号', readonly=True)
|
||||
pad_name = fields.Char('刀盘名称', readonly=True)
|
||||
sf_tool_brand_id_4 = fields.Many2one('sf.machine.brand', '刀盘品牌', readonly=True)
|
||||
|
||||
# 刀柄型号
|
||||
cutting_tool_cutterhandle_model_id = fields.Many2one('product.product', string='刀柄型号', readonly=False,
|
||||
domain=[('cutting_tool_material_id', '=', '刀柄')])
|
||||
handle_code = fields.Char('刀柄序列号', readonly=True, compute='_compute_handle_code')
|
||||
handle_name = fields.Char('刀柄名称', readonly=True, compute='_compute_handle_name')
|
||||
sf_tool_brand_id_5 = fields.Many2one('sf.machine.brand', '刀柄品牌', readonly=True,
|
||||
compute='_compute_sf_tool_brand_id_5')
|
||||
|
||||
@api.depends('cutting_tool_cutterhandle_model_id')
|
||||
def _compute_handle_code(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterhandle_model_id:
|
||||
self.handle_code = self.cutting_tool_cutterhandle_model_id.code
|
||||
else:
|
||||
self.handle_code = None
|
||||
|
||||
@api.depends('cutting_tool_cutterhandle_model_id')
|
||||
def _compute_handle_name(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterhandle_model_id:
|
||||
self.handle_name = self.cutting_tool_cutterhandle_model_id.name
|
||||
else:
|
||||
self.handle_name = None
|
||||
|
||||
@api.depends('cutting_tool_cutterhandle_model_id')
|
||||
def _compute_sf_tool_brand_id_5(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterhandle_model_id:
|
||||
self.sf_tool_brand_id_5 = self.cutting_tool_cutterhandle_model_id.brand_id.id
|
||||
else:
|
||||
self.sf_tool_brand_id_5 = None
|
||||
handle_code_id = fields.Many2one('stock.lot', '刀柄序列号',
|
||||
domain=[('product_id.cutting_tool_material_id.name', '=', '刀柄')])
|
||||
cutting_tool_cutterhandle_model_id = fields.Many2one('sf.cutting.tool.material', string='刀柄型号', readonly=True)
|
||||
handle_name = fields.Char('刀柄名称', readonly=True)
|
||||
sf_tool_brand_id_5 = fields.Many2one('sf.machine.brand', '刀柄品牌', readonly=True)
|
||||
|
||||
# 夹头型号
|
||||
cutting_tool_cutterhead_model_id = fields.Many2one('product.product', string='夹头型号', readonly=False,
|
||||
domain=[('cutting_tool_material_id', '=', '夹头')])
|
||||
chuck_code = fields.Char('夹头序列号', readonly=True, compute='_compute_chuck_code')
|
||||
chuck_name = fields.Char('夹头名称', readonly=True, compute='_compute_chuck_name')
|
||||
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', readonly=True,
|
||||
compute='_compute_sf_tool_brand_id_6')
|
||||
chuck_code_id = fields.Many2one('stock.lot', '夹头序列号',
|
||||
domain=[('product_id.cutting_tool_material_id.name', '=', '夹头')])
|
||||
cutting_tool_cutterhead_model_id = fields.Many2one('sf.cutting.tool.material', string='夹头型号', readonly=True)
|
||||
chuck_name = fields.Char('夹头名称', readonly=True, compute='_compute_auto_fill')
|
||||
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', readonly=True)
|
||||
|
||||
@api.depends('cutting_tool_cutterhead_model_id')
|
||||
def _compute_chuck_code(self):
|
||||
def on_barcode_scanned(self, barcode):
|
||||
"""
|
||||
智能工厂组装单处扫码绑定刀具物料')
|
||||
"""
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterhead_model_id:
|
||||
self.chuck_code = self.cutting_tool_cutterhead_model_id.code
|
||||
records = record.env['stock.lot'].search([('name', '=', barcode)])
|
||||
if not records:
|
||||
raise ValidationError('扫描的条形码数据不存在,请重新扫描!')
|
||||
for record_stock_lot in records:
|
||||
tool_material_name = record_stock_lot.product_id.cutting_tool_material_id.name
|
||||
if tool_material_name == '整体式刀具':
|
||||
record.integral_code_id = record_stock_lot.id
|
||||
elif tool_material_name == '刀片':
|
||||
record.blade_code_id = record_stock_lot.id
|
||||
elif tool_material_name == '刀杆':
|
||||
record.bar_code_id = record_stock_lot.id
|
||||
elif tool_material_name == '刀盘':
|
||||
record.pad_code_id = record_stock_lot.id
|
||||
elif tool_material_name == '刀柄':
|
||||
record.handle_code_id = record_stock_lot.id
|
||||
elif tool_material_name == '夹头':
|
||||
record.chuck_code_id = record_stock_lot.id
|
||||
else:
|
||||
self.chuck_code = None
|
||||
raise ValidationError('扫描的刀具物料不存在,请重新扫描!')
|
||||
|
||||
@api.depends('cutting_tool_cutterhead_model_id')
|
||||
def _compute_chuck_name(self):
|
||||
@api.depends('integral_code_id', 'blade_code_id', 'bar_code_id', 'pad_code_id', 'handle_code_id', 'chuck_code_id')
|
||||
def _compute_auto_fill(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterhead_model_id:
|
||||
self.chuck_name = self.cutting_tool_cutterhead_model_id.name
|
||||
if record.integral_code_id:
|
||||
record.cutting_tool_integral_model_id = record.integral_code_id.product_id.cutting_tool_material_id.id
|
||||
record.integral_name = record.integral_code_id.product_id.name
|
||||
record.sf_tool_brand_id_1 = record.integral_code_id.product_id.brand_id.id
|
||||
else:
|
||||
self.chuck_name = None
|
||||
|
||||
@api.depends('cutting_tool_cutterhead_model_id')
|
||||
def _compute_sf_tool_brand_id_6(self):
|
||||
for record in self:
|
||||
if record.cutting_tool_cutterhead_model_id:
|
||||
self.sf_tool_brand_id_6 = self.cutting_tool_cutterhead_model_id.brand_id.id
|
||||
record.cutting_tool_integral_model_id = None
|
||||
record.integral_name = None
|
||||
record.sf_tool_brand_id_1 = None
|
||||
if record.blade_code_id:
|
||||
record.cutting_tool_blade_model_id = record.blade_code_id.product_id.cutting_tool_material_id.id
|
||||
record.blade_name = record.blade_code_id.product_id.name
|
||||
record.sf_tool_brand_id_2 = record.blade_code_id.product_id.brand_id.id
|
||||
else:
|
||||
self.sf_tool_brand_id_6 = None
|
||||
record.cutting_tool_blade_model_id = None
|
||||
record.blade_name = None
|
||||
record.sf_tool_brand_id_2 = None
|
||||
if record.bar_code_id:
|
||||
record.cutting_tool_cutterbar_model_id = record.bar_code_id.product_id.cutting_tool_material_id.id
|
||||
record.bar_name = record.bar_code_id.product_id.name
|
||||
record.sf_tool_brand_id_3 = record.bar_code_id.product_id.brand_id.id
|
||||
else:
|
||||
record.cutting_tool_cutterbar_model_id = None
|
||||
record.bar_name = None
|
||||
record.sf_tool_brand_id_3 = None
|
||||
if record.pad_code_id:
|
||||
record.cutting_tool_cutterpad_model_id = record.pad_code_id.product_id.cutting_tool_material_id.id
|
||||
record.pad_name = record.pad_code_id.product_id.name
|
||||
record.sf_tool_brand_id_4 = record.pad_code_id.product_id.brand_id.id
|
||||
else:
|
||||
record.cutting_tool_cutterpad_model_id = None
|
||||
record.pad_name = None
|
||||
record.sf_tool_brand_id_4 = None
|
||||
if record.handle_code_id:
|
||||
record.cutting_tool_cutterhandle_model_id = record.handle_code_id.product_id.cutting_tool_material_id.id
|
||||
record.handle_name = record.handle_code_id.product_id.name
|
||||
record.sf_tool_brand_id_5 = record.handle_code_id.product_id.brand_id.id
|
||||
else:
|
||||
record.cutting_tool_cutterhandle_model_id = None
|
||||
record.handle_name = None
|
||||
record.sf_tool_brand_id_5 = None
|
||||
if record.chuck_code_id:
|
||||
record.cutting_tool_cutterhead_model_id = record.chuck_code_id.product_id.cutting_tool_material_id.id
|
||||
record.chuck_name = record.chuck_code_id.product_id.name
|
||||
record.sf_tool_brand_id_6 = record.chuck_code_id.product_id.brand_id.id
|
||||
else:
|
||||
record.cutting_tool_cutterhead_model_id = None
|
||||
record.chuck_name = None
|
||||
record.sf_tool_brand_id_6 = None
|
||||
|
||||
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', default='1')
|
||||
tool_loading_length = fields.Char(string='装刀长')
|
||||
@@ -343,27 +271,27 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
"""
|
||||
desc_1 = {
|
||||
'cutting_tool_integral_model_id': self.cutting_tool_integral_model_id.id,
|
||||
'integral_code': self.integral_code,
|
||||
'integral_code_id': self.integral_code_id.id,
|
||||
'integral_name': self.integral_name,
|
||||
'sf_tool_brand_id_1': self.sf_tool_brand_id_1,
|
||||
'cutting_tool_blade_model_id': self.cutting_tool_blade_model_id.id,
|
||||
'blade_code': self.blade_code,
|
||||
'blade_code_id': self.blade_code_id.id,
|
||||
'blade_name': self.blade_name,
|
||||
'sf_tool_brand_id_2': self.sf_tool_brand_id_2,
|
||||
'cutting_tool_cutterbar_model_id': self.cutting_tool_cutterbar_model_id.id,
|
||||
'bar_code': self.bar_code,
|
||||
'bar_code_id': self.bar_code_id.id,
|
||||
'bar_name': self.bar_name,
|
||||
'sf_tool_brand_id_3': self.sf_tool_brand_id_3,
|
||||
'cutting_tool_cutterpad_model_id': self.cutting_tool_cutterpad_model_id.id,
|
||||
'pad_code': self.pad_code,
|
||||
'pad_code_id': self.pad_code_id.id,
|
||||
'pad_name': self.pad_name,
|
||||
'sf_tool_brand_id_4': self.sf_tool_brand_id_4,
|
||||
'cutting_tool_cutterhandle_model_id': self.cutting_tool_cutterhandle_model_id.id,
|
||||
'handle_code': self.handle_code,
|
||||
'handle_code_id': self.handle_code_id.id,
|
||||
'handle_name': self.handle_name,
|
||||
'sf_tool_brand_id_5': self.sf_tool_brand_id_5,
|
||||
'cutting_tool_cutterhead_model_id': self.cutting_tool_cutterhead_model_id.id,
|
||||
'chuck_code': self.chuck_code,
|
||||
'chuck_code_id': self.chuck_code_id.id,
|
||||
'chuck_name': self.chuck_name,
|
||||
'sf_tool_brand_id_6': self.sf_tool_brand_id_6,
|
||||
'coarse_middle_thin': self.coarse_middle_thin,
|
||||
|
||||
@@ -140,58 +140,142 @@
|
||||
<field name="required_cutting_time"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="组装物料信息">
|
||||
<group string="组装物料信息" col="1">
|
||||
<field name="_barcode_scanned" widget="barcode_handler"/>
|
||||
<group col="1" attrs="{'invisible': ['|','|',('blade_code_id', '!=', False),('bar_code_id', '!=', False),('pad_code_id', '!=', False)]}">
|
||||
<div>
|
||||
<separator string="整体式刀具:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<field name="cutting_tool_integral_model_id" string="整体式刀具型号"
|
||||
options="{'no_create': True, 'no_quick_create': True}" placeholder="请选择"
|
||||
attrs="{'invisible': [('cutting_tool_blade_model_id', '!=', False)]}"/>
|
||||
<field name="integral_code"
|
||||
attrs="{'invisible': [('cutting_tool_blade_model_id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_blade_model_id" string="刀片型号"
|
||||
options="{'no_create': True, 'no_quick_create': True}" placeholder="请选择"
|
||||
attrs="{'invisible': [('cutting_tool_integral_model_id', '!=', False)]}"/>
|
||||
<field name="blade_code"
|
||||
attrs="{'invisible': [('cutting_tool_integral_model_id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cutterbar_model_id" string="刀杆型号"
|
||||
options="{'no_create': True, 'no_quick_create': True}" placeholder="请选择"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterpad_model_id', '!=', False)]}"/>
|
||||
<field name="bar_code"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterpad_model_id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cutterpad_model_id" string="刀盘型号"
|
||||
options="{'no_create': True, 'no_quick_create': True}" placeholder="请选择"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterbar_model_id', '!=', False)]}"/>
|
||||
<field name="pad_code"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterbar_model_id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_cutterhandle_model_id" string="刀柄型号"
|
||||
options="{'no_create': True, 'no_quick_create': True}" placeholder="请选择"/>
|
||||
<field name="handle_code"/>
|
||||
<field name="cutting_tool_cutterhead_model_id" string="夹头型号"
|
||||
options="{'no_create': True, 'no_quick_create': True}" placeholder="请选择"/>
|
||||
<field name="chuck_code"/>
|
||||
<group>
|
||||
<field name="integral_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="integral_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="integral_name"
|
||||
attrs="{'invisible': [('cutting_tool_blade_model_id', '!=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_1"
|
||||
attrs="{'invisible': [('cutting_tool_blade_model_id', '!=', False)]}"/>
|
||||
<field name="blade_name"
|
||||
attrs="{'invisible': [('cutting_tool_integral_model_id', '!=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_2"
|
||||
attrs="{'invisible': [('cutting_tool_integral_model_id', '!=', False)]}"/>
|
||||
<field name="bar_name"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterpad_model_id', '!=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_3"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterpad_model_id', '!=', False)]}"/>
|
||||
<field name="pad_name"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterbar_model_id', '!=', False)]}"/>
|
||||
<field name="sf_tool_brand_id_4"
|
||||
attrs="{'invisible': ['|',('cutting_tool_integral_model_id', '!=', False),('cutting_tool_cutterbar_model_id', '!=', False)]}"/>
|
||||
<field name="handle_name"/>
|
||||
<field name="sf_tool_brand_id_5"/>
|
||||
<field name="chuck_name"/>
|
||||
<field name="sf_tool_brand_id_6"/>
|
||||
<field name="cutting_tool_integral_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_1" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1" attrs="{'invisible': [('integral_code_id', '!=', False)]}">
|
||||
<div>
|
||||
<separator string="刀片:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="blade_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="blade_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_blade_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_2" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1" attrs="{'invisible': ['|',('integral_code_id', '!=', False),('pad_code_id', '!=', False)]}">
|
||||
<div>
|
||||
<separator string="刀杆:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="bar_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="bar_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterbar_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_3" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1" attrs="{'invisible': ['|',('integral_code_id', '!=', False),('bar_code_id', '!=', False)]}">
|
||||
<div>
|
||||
<separator string="刀盘:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="pad_code_id" placeholder="请选择" string="序列号"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="pad_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterpad_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_4" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1">
|
||||
<div>
|
||||
<separator string="刀柄:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="handle_code_id" string="序列号" placeholder="请选择"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="handle_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterhandle_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_5" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group col="1">
|
||||
<div>
|
||||
<separator string="夹头:" style="font-size: 13px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="chuck_code_id" string="序列号" placeholder="请选择"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="chuck_name" string="名称"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutting_tool_cutterhead_model_id" string="型号"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sf_tool_brand_id_6" string="品牌"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group string="组装参数信息">
|
||||
<group>
|
||||
<field name="coarse_middle_thin"/>
|
||||
|
||||
Reference in New Issue
Block a user