1、功能刀具组装单添加对应调拨单跳转按钮;功能刀具拆解单添加调拨单跳转按钮和功能刀具移动跳转按钮;2、功能刀具拆解模型,form视图添加报废page页存放刀具物料报废单,优化拆解流程添加功能刀具拆解移动记录;3、功能刀具出入库列表视图添加拆解单跳转链接;4、功能刀具安全库存模型添加名称唯一验证,优化字段计算方法;5、优化功能刀具同步到cloud的同步接口,解决编码问题;

This commit is contained in:
yuxianghui
2024-07-03 17:17:48 +08:00
parent cbc8a41984
commit 4a86871039
5 changed files with 158 additions and 66 deletions

View File

@@ -37,14 +37,10 @@ class ToolDatasync(models.Model):
def _cron_tool_datasync_all(self):
try:
self.env['stock.lot'].sudo().sync_enroll_tool_material_stock_all()
self.env['stock.lot'].sudo().sync_enroll_fixture_material_stock_all()
self.env['sf.tool.material.search'].sudo().sync_enroll_tool_material_all()
self.env['stock.lot'].sudo().sync_enroll_tool_material_stock_all()
self.env['sf.fixture.material.search'].sudo().sync_enroll_fixture_material_all()
self.env['stock.lot'].sudo().sync_enroll_fixture_material_stock_all()
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()
@@ -106,7 +102,7 @@ class StockLot(models.Model):
logging.info("没有刀具物料序列号信息")
except Exception as e:
logging.info("刀具物料序列号同步失败:%s" % e)
class ToolMaterial(models.Model):
_inherit = 'sf.tool.material.search'
@@ -198,7 +194,7 @@ class FunctionalCuttingToolEntity(models.Model):
for item in objs_all:
val = {
'id': item.id,
'code': item.code,
'code': False if not item.code else item.code.split('-', 1)[1],
'name': item.name,
'rfid': item.rfid,
'tool_groups_name': item.tool_groups_id.name,