1、优化没有刀具信息记录时同步报错问题
This commit is contained in:
@@ -44,7 +44,7 @@ class ToolDatasync(models.Model):
|
||||
self.env['sf.functional.cutting.tool.entity'].sudo().esync_enroll_functional_tool_entity_all()
|
||||
logging.info("功能刀具列表每日同步成功")
|
||||
self.env['sf.functional.tool.warning'].sudo().sync_enroll_functional_tool_warning_all()
|
||||
logging.info("功能刀具列表每日同步成功")
|
||||
logging.info("功能刀具预警每日同步成功")
|
||||
self.env['stock.move.line'].sudo().sync_enroll_functional_tool_move_all()
|
||||
logging.info("功能刀具出入库记录每日同步成功")
|
||||
self.env[
|
||||
@@ -94,7 +94,7 @@ class StockLot(models.Model):
|
||||
if ret.get('code') == 200:
|
||||
return '刀具物料序列号注册成功'
|
||||
else:
|
||||
raise UserError("没有注册刀具物料序列号信息")
|
||||
logging.info("没有注册刀具物料序列号信息")
|
||||
|
||||
|
||||
class ToolMaterial(models.Model):
|
||||
@@ -144,7 +144,7 @@ class ToolMaterial(models.Model):
|
||||
if ret.get('code') == 200:
|
||||
return '刀具物料注册成功'
|
||||
else:
|
||||
raise UserError("没有注册刀具物料信息")
|
||||
logging.info('没有注册刀具物料信息')
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
@@ -231,7 +231,7 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具信息")
|
||||
logging.info('没有注册功能刀具信息')
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
@@ -310,7 +310,7 @@ class FunctionalToolWarning(models.Model):
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具预警注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具预警信息")
|
||||
logging.info('没有注册功能刀具预警信息')
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
@@ -374,7 +374,7 @@ class StockMoveLine(models.Model):
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具出入库记录注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具出入库记录信息")
|
||||
logging.info('没有注册功能刀具出入库记录信息')
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
@@ -450,7 +450,7 @@ class RealTimeDistributionFunctionalTools(models.Model):
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具出入库记录注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具出入库记录信息")
|
||||
logging.info('没有注册功能刀具出入库记录信息')
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
|
||||
Reference in New Issue
Block a user