新增胚料的模型类型
This commit is contained in:
@@ -109,7 +109,7 @@ class MrpProduction(models.Model):
|
||||
processing_panel_len = len(production.product_id.model_processing_panel.split(','))
|
||||
for k in (production.product_id.model_processing_panel.split(',')):
|
||||
product_routing_workcenter = self.env['sf.product.model.type.routing.sort'].search(
|
||||
[('model_type_id', '=', production.product_id.model_type_id.id)],
|
||||
[('product_model_type_id', '=', production.product_id.product_model_type_id.id)],
|
||||
order='sequence asc'
|
||||
)
|
||||
i += 1
|
||||
@@ -125,7 +125,7 @@ class MrpProduction(models.Model):
|
||||
self.env['mrp.workorder'].json_workorder_str(k, production, route))
|
||||
elif production.product_id.categ_id.type == '胚料':
|
||||
embryo_routing_workcenter = self.env['sf.embryo.model.type.routing.sort'].search(
|
||||
[('model_type_id', '=', production.product_id.model_type_id.id)],
|
||||
[('embryo_model_type_id', '=', production.product_id.embryo_model_type_id.id)],
|
||||
order='sequence asc'
|
||||
)
|
||||
for route in embryo_routing_workcenter:
|
||||
|
||||
@@ -29,6 +29,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
('CNC加工', 'CNC加工'),
|
||||
('后置三元质量检测', '后置三元质量检测'),
|
||||
('解除装夹', '解除装夹'),
|
||||
('切割', '切割')
|
||||
], string="工序类型")
|
||||
|
||||
@api.onchange('users_ids')
|
||||
@@ -89,7 +90,6 @@ class ResMrpWorkOrder(models.Model):
|
||||
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工")
|
||||
tray_code = fields.Char(string="托盘")
|
||||
|
||||
|
||||
# 计算配料中心点和与x轴倾斜度方法
|
||||
def getcenter(self):
|
||||
try:
|
||||
@@ -135,7 +135,6 @@ class ResMrpWorkOrder(models.Model):
|
||||
except:
|
||||
raise UserError("参数计算有误")
|
||||
|
||||
|
||||
def json_workorder_str(self, k, production, route):
|
||||
workorders_values_str = [0, '', {
|
||||
'product_uom_id': production.product_uom_id.id,
|
||||
@@ -171,7 +170,9 @@ class ResMrpWorkOrder(models.Model):
|
||||
'target': 'new',
|
||||
'domain': [('workorder_id', '=', self.id)]
|
||||
}
|
||||
|
||||
tray_id = fields.Many2one('sf.tray', string="托盘信息")
|
||||
|
||||
# 扫码绑定托盘方法
|
||||
|
||||
def gettray(self):
|
||||
@@ -230,7 +231,6 @@ class ResMrpWorkOrder(models.Model):
|
||||
tray.unclamp()
|
||||
self.tray_id = tray
|
||||
|
||||
|
||||
# return {
|
||||
# 'name': _('New Maintenance Request'),
|
||||
# 'view_mode': 'form',
|
||||
@@ -288,7 +288,6 @@ class ResMrpWorkOrder(models.Model):
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
# cnc程序获取
|
||||
def fetchCNC(self):
|
||||
try:
|
||||
@@ -499,7 +498,6 @@ class CNCprocessing(models.Model):
|
||||
download_state = ftp.download_file_tree(remotepath, serverdir)
|
||||
return download_state
|
||||
|
||||
|
||||
# 将nc文件存到attach的datas里
|
||||
def write_file(self, nc_file_path, cnc):
|
||||
if os.path.exists(nc_file_path):
|
||||
|
||||
Reference in New Issue
Block a user