Merge branch 'hotfix/刀具预调仪' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into release/release_1.4
This commit is contained in:
@@ -156,14 +156,6 @@ class ToolMaterial(models.Model):
|
||||
except Exception as e:
|
||||
logging.info("捕获错误信息:%s" % e)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(ToolMaterial, self).create(vals_list)
|
||||
for record in records:
|
||||
if record:
|
||||
record.enroll_tool_material()
|
||||
return records
|
||||
|
||||
|
||||
class FunctionalCuttingToolEntity(models.Model):
|
||||
_inherit = 'sf.functional.cutting.tool.entity'
|
||||
@@ -248,20 +240,6 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
except Exception as e:
|
||||
logging.info("捕获错误信息:%s" % e)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(FunctionalCuttingToolEntity, self).create(vals_list)
|
||||
for record in records:
|
||||
if record:
|
||||
record.enroll_functional_tool_entity()
|
||||
return records
|
||||
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
if vals.get('current_location'):
|
||||
self.enroll_functional_tool_entity()
|
||||
return res
|
||||
|
||||
|
||||
class FunctionalToolWarning(models.Model):
|
||||
_inherit = 'sf.functional.tool.warning'
|
||||
@@ -332,14 +310,6 @@ class FunctionalToolWarning(models.Model):
|
||||
except Exception as e:
|
||||
logging.info("捕获错误信息:%s" % e)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(FunctionalToolWarning, self).create(vals_list)
|
||||
for record in records:
|
||||
if record:
|
||||
record.enroll_functional_tool_warning()
|
||||
return records
|
||||
|
||||
|
||||
class StockMoveLine(models.Model):
|
||||
_inherit = 'stock.move.line'
|
||||
@@ -401,14 +371,6 @@ class StockMoveLine(models.Model):
|
||||
except Exception as e:
|
||||
logging.info("捕获错误信息:%s" % e)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(StockMoveLine, self).create(vals_list)
|
||||
for record in records:
|
||||
if record.functional_tool_name_id:
|
||||
record.enroll_functional_tool_move()
|
||||
return records
|
||||
|
||||
|
||||
class RealTimeDistributionFunctionalTools(models.Model):
|
||||
_inherit = 'sf.real.time.distribution.of.functional.tools'
|
||||
@@ -481,17 +443,3 @@ class RealTimeDistributionFunctionalTools(models.Model):
|
||||
logging.info('没有注册功能刀具出入库记录信息')
|
||||
except Exception as e:
|
||||
logging.info("捕获错误信息:%s" % e)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(RealTimeDistributionFunctionalTools, self).create(vals_list)
|
||||
for record in records:
|
||||
if record:
|
||||
record.enroll_functional_tool_real_time_distribution()
|
||||
return records
|
||||
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
if vals.get('sf_functional_tool_entity_ids') or vals.get('min_stock_num') or vals.get('max_stock_num'):
|
||||
self.enroll_functional_tool_real_time_distribution()
|
||||
return res
|
||||
|
||||
@@ -134,10 +134,7 @@ class StockLot(models.Model):
|
||||
record.tool_material_status = '报废'
|
||||
else:
|
||||
record.tool_material_status = '未入库'
|
||||
if record.tool_material_search_id:
|
||||
# 注册刀具物料状态到cloud平台
|
||||
record.enroll_tool_material_stock()
|
||||
elif record.fixture_material_search_id:
|
||||
if record.fixture_material_search_id:
|
||||
# 注册夹具物料状态到cloud平台
|
||||
record.enroll_fixture_material_stock()
|
||||
|
||||
|
||||
@@ -45,8 +45,6 @@ class ToolMaterial(models.Model):
|
||||
record.have_been_used_num = have_been_used_num
|
||||
record.scrap_num = scrap_num
|
||||
record.number = usable_num + have_been_used_num + scrap_num
|
||||
# 更新数据到cloud的动态数据
|
||||
record.enroll_tool_material()
|
||||
|
||||
@api.model
|
||||
def _read_group_cutting_tool_material_id(self, categories, domain, order):
|
||||
|
||||
Reference in New Issue
Block a user