Accept Merge Request #2053: (feature/6694 -> develop)
Merge Request: 修改模型id为模型ID,增加机台判断 Created By: @胡尧 Accepted By: @胡尧 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/2053?initial=true
This commit is contained in:
@@ -19,7 +19,10 @@ class MainController(http.Controller):
|
||||
return {'code': 400, 'message': '参数错误'}
|
||||
if not isinstance(maintenance_equipment_id, int) and not isinstance(model_id, str):
|
||||
return {'code': 400, 'message': '参数类型错误'}
|
||||
maintenance_equipment = request.env['maintenance.equipment'].sudo().search([('id', '=', maintenance_equipment_id)], limit=1)
|
||||
maintenance_equipment = request.env['maintenance.equipment'].sudo().search(
|
||||
[('id', '=', maintenance_equipment_id), ('category_id.equipment_type', '=', '机床')],
|
||||
limit=1
|
||||
)
|
||||
if not maintenance_equipment:
|
||||
return {'code': 400, 'message': '机台不存在,请扫描正确的机台二维码'}
|
||||
product = request.env['product.template'].sudo().search([('model_id', '=', model_id)], limit=1)
|
||||
|
||||
@@ -1821,7 +1821,7 @@ class MrpProduction(models.Model):
|
||||
logging.info('update_programming_state error:%s' % e)
|
||||
raise UserError("更新编程单状态失败,请联系管理员")
|
||||
|
||||
model_id = fields.Char('模型id', related='product_id.model_id')
|
||||
model_id = fields.Char('模型ID', related='product_id.model_id')
|
||||
|
||||
|
||||
# 编程记录
|
||||
|
||||
@@ -1814,7 +1814,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
lazy=lazy
|
||||
)
|
||||
|
||||
model_id = fields.Char('模型id', related='production_id.model_id')
|
||||
model_id = fields.Char('模型ID', related='production_id.model_id')
|
||||
|
||||
|
||||
class CNCprocessing(models.Model):
|
||||
|
||||
@@ -787,7 +787,7 @@ class ResProductMo(models.Model):
|
||||
glb_url = fields.Char('glb文件地址')
|
||||
area = fields.Float('表面积(m²)')
|
||||
auto_machining = fields.Boolean('自动化加工(模型识别)', default=False)
|
||||
model_id = fields.Char('模型id')
|
||||
model_id = fields.Char('模型ID')
|
||||
|
||||
|
||||
@api.depends('name')
|
||||
|
||||
@@ -271,7 +271,7 @@ class ResaleOrderLine(models.Model):
|
||||
embryo_redundancy_id = fields.Many2one('sf.embryo.redundancy', '坯料冗余')
|
||||
manual_quotation = fields.Boolean('人工编程', default=False)
|
||||
model_url = fields.Char('模型文件地址')
|
||||
model_id = fields.Char('模型id')
|
||||
model_id = fields.Char('模型ID')
|
||||
|
||||
delivery_end_date = fields.Date('交货截止日期')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user