From 62a2aed7d98bae35ff0958afc136299f46033020 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Tue, 8 Oct 2024 14:26:12 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E9=A1=BA=E5=BA=8F=E4=BC=98=E5=8C=96=E4=B8=BA?=
=?UTF-8?q?=EF=BC=9A=20=20=E7=A1=AE=E8=AE=A4=E6=8E=A5=E5=8D=95/=E6=8B=92?=
=?UTF-8?q?=E7=BB=9D=E6=8E=A5=E5=8D=95/=E5=88=9B=E5=BB=BA=E7=BB=93?=
=?UTF-8?q?=E7=AE=97=E5=8D=95/=E9=80=9A=E8=BF=87Email=E5=8F=91=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_sale/views/sale_order_view.xml | 38 +++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/sf_sale/views/sale_order_view.xml b/sf_sale/views/sale_order_view.xml
index 506f5b8d..a5c7a6fa 100644
--- a/sf_sale/views/sale_order_view.xml
+++ b/sf_sale/views/sale_order_view.xml
@@ -17,11 +17,6 @@
-
-
-
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
1
From f18c0e3eafa3428e90fb80cb7300f7ac9b8d5cee Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Wed, 9 Oct 2024 17:52:20 +0800
Subject: [PATCH 2/4] =?UTF-8?q?1=E3=80=81=E9=87=8D=E6=9E=84cnc=E7=94=A8?=
=?UTF-8?q?=E5=88=80=E6=A0=A1=E9=AA=8C=E6=96=B9=E6=B3=95=EF=BC=8C=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E4=B8=8B=E5=8F=91=E7=BC=96=E7=A8=8B=E5=8D=95=E5=90=8E?=
=?UTF-8?q?=E6=A0=A1=E9=AA=8Ccnc=E7=94=A8=E5=88=80=E7=9A=84=E9=80=BB?=
=?UTF-8?q?=E8=BE=91=EF=BC=9B2=E3=80=81=E4=BC=98=E5=8C=96CAM=E5=88=9B?=
=?UTF-8?q?=E5=BB=BA=E6=96=B9=E6=B3=95=EF=BC=9B3=E3=80=81=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E8=8E=B7=E5=8F=96mrs=E7=BC=96=E7=A8=8B=E5=8D=95?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E3=80=81=E4=BC=98=E5=8C=96=E7=BC=96=E7=A8=8B?=
=?UTF-8?q?=E5=8D=95=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_manufacturing/models/mrp_production.py | 7 +-
sf_mrs_connect/controllers/controllers.py | 4 ++
sf_tool_management/models/base.py | 50 ++++++-------
sf_tool_management/models/mrp_workorder.py | 83 +++++++++++++++++++---
4 files changed, 111 insertions(+), 33 deletions(-)
diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py
index 59ce68ab..dda99bfb 100644
--- a/sf_manufacturing/models/mrp_production.py
+++ b/sf_manufacturing/models/mrp_production.py
@@ -296,8 +296,13 @@ class MrpProduction(models.Model):
# 编程单更新
def update_programming_state(self):
try:
+ manufacturing_type = 'rework'
+ if self.is_scrap is False:
+ manufacturing_type = 'scrap'
+ elif self.tool_state == '2':
+ manufacturing_type = 'invalid_tool_rework'
res = {'programming_no': self.programming_no,
- 'manufacturing_type': 'rework' if self.is_scrap is False else 'scrap'}
+ 'manufacturing_type': manufacturing_type}
logging.info('res=%s:' % res)
configsettings = self.env['res.config.settings'].get_values()
config_header = Common.get_headers(self, configsettings['token'], configsettings['sf_secret_key'])
diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py
index 7f3c3d83..50383a19 100644
--- a/sf_mrs_connect/controllers/controllers.py
+++ b/sf_mrs_connect/controllers/controllers.py
@@ -96,6 +96,10 @@ class Sf_Mrs_Connect(http.Controller):
res.update({
'production_ids': productions.ids
})
+
+ # 对制造订单所以面的cnc工单的程序用刀进行校验
+ productions.production_cnc_tool_checkout()
+
return json.JSONEncoder().encode(res)
else:
res = {'status': 0, 'message': '该制造订单暂未开始'}
diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py
index 33ab0790..56993ddb 100644
--- a/sf_tool_management/models/base.py
+++ b/sf_tool_management/models/base.py
@@ -314,7 +314,7 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
'applicant': None,
'sf_functional_tool_assembly_id': None})
- def create_cam_work_plan(self, cnc_processing):
+ def create_cam_work_plan(self, cnc_processing, missing_tools):
"""
根据传入的工单信息,查询是否有需要的功能刀具,如果没有则生成CAM工单程序用刀计划
"""
@@ -322,29 +322,31 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
# 获取编程单号
programming_no = cnc_processing.workorder_id.production_id.programming_no
logging.info(f'编程单号:{programming_no}')
- cam_id = self.env['sf.cam.work.order.program.knife.plan'].sudo().search(
- [('programming_no', '=', programming_no),
- ('functional_tool_name', '=', cnc_processing.cutting_tool_name)])
- logging.info(f'CAM装刀计划:{cam_id}')
- if not cam_id:
- knife_plan = self.env['sf.cam.work.order.program.knife.plan'].sudo().create({
- 'name': cnc_processing.workorder_id.production_id.name,
- 'programming_no': programming_no,
- 'cam_procedure_code': cnc_processing.program_name,
- 'filename': cnc_processing.cnc_id.name,
- 'functional_tool_name': cnc_processing.cutting_tool_name,
- 'cam_cutter_spacing_code': cnc_processing.cutting_tool_no,
- 'process_type': cnc_processing.processing_type,
- 'margin_x_y': float(cnc_processing.margin_x_y),
- 'margin_z': float(cnc_processing.margin_z),
- 'finish_depth': float(cnc_processing.depth_of_processing_z),
- 'extension_length': float(cnc_processing.cutting_tool_extension_length),
- 'shank_model': cnc_processing.cutting_tool_handle_type,
- 'estimated_processing_time': cnc_processing.estimated_processing_time,
- })
- logging.info('CAM工单程序用刀计划创建成功!!!')
- # 创建装刀请求
- knife_plan.apply_for_tooling()
+ for missing_tool in missing_tools:
+ cam_id = self.env['sf.cam.work.order.program.knife.plan'].sudo().search(
+ [('programming_no', '=', programming_no),
+ ('functional_tool_name', '=', missing_tool)])
+ if cam_id:
+ logging.info(f'CAM装刀计划:{cam_id}')
+ else:
+ knife_plan = self.env['sf.cam.work.order.program.knife.plan'].sudo().create({
+ 'name': cnc_processing.workorder_id.production_id.name,
+ 'programming_no': programming_no,
+ 'cam_procedure_code': cnc_processing.program_name,
+ 'filename': cnc_processing.cnc_id.name,
+ 'functional_tool_name': missing_tool,
+ 'cam_cutter_spacing_code': cnc_processing.cutting_tool_no,
+ 'process_type': cnc_processing.processing_type,
+ 'margin_x_y': float(cnc_processing.margin_x_y),
+ 'margin_z': float(cnc_processing.margin_z),
+ 'finish_depth': float(cnc_processing.depth_of_processing_z),
+ 'extension_length': float(cnc_processing.cutting_tool_extension_length),
+ 'shank_model': cnc_processing.cutting_tool_handle_type,
+ 'estimated_processing_time': cnc_processing.estimated_processing_time,
+ })
+ logging.info('CAM工单程序用刀计划创建成功!!!')
+ # 创建装刀请求
+ knife_plan.apply_for_tooling()
def unlink_cam_plan(self, production):
for item in production:
diff --git a/sf_tool_management/models/mrp_workorder.py b/sf_tool_management/models/mrp_workorder.py
index ce63c25d..2fd58354 100644
--- a/sf_tool_management/models/mrp_workorder.py
+++ b/sf_tool_management/models/mrp_workorder.py
@@ -29,7 +29,7 @@ class CNCprocessing(models.Model):
# else:
# raise ValidationError("MES装刀指令发送失败")
- def cnc_tool_checkout(self, cnc_processing_ids):
+ def cnc_tool_checkout_1(self, cnc_processing_ids):
"""
根据传入的工单信息,查询是否有需要的功能刀具,如果没有则生成CAM工单程序用刀计划
"""
@@ -128,13 +128,6 @@ class CNCprocessing(models.Model):
})
logging.info('工单cnc程序用刀校验已完成!')
- @api.model_create_multi
- def create(self, vals):
- obj = super(CNCprocessing, self).create(vals)
- # 调用CAM工单程序用刀计划创建方法
- self.cnc_tool_checkout(obj)
- return obj
-
class MrpWorkCenter(models.Model):
_inherit = 'mrp.workcenter'
@@ -143,3 +136,77 @@ class MrpWorkCenter(models.Model):
action = self.env.ref('sf_tool_management.sf_functional_tool_assembly_view_act')
result = action.read()[0]
return result
+
+
+class MrpProduction(models.Model):
+ _inherit = 'mrp.production'
+
+ def production_cnc_tool_checkout(self):
+ logging.info('开始进行工单cnc程序用刀校验!!!')
+ invalid_tool = [] # 无效刀
+ invalid_tool_processing_panel = [] # 无效刀加工面
+ missing_tool_1 = [] # 缺刀(机内、线边)
+ missing_tool_2 = [] # 缺刀(库存)
+ for item in self:
+ workorder_ids = item.workorder_ids.filtered(lambda a: a.state not in ['rework', 'cancel'])
+ for workorder_id in workorder_ids:
+ if workorder_id.cnc_ids:
+ for cnc_id in workorder_id.cnc_ids:
+ tool_name = cnc_id.cutting_tool_name
+ # 查询功能刀具在清单中是否存在
+ tool_inventory_id = self.env['sf.tool.inventory'].sudo().search([('name', '=', tool_name)])
+ if not tool_inventory_id:
+ invalid_tool.append(tool_name)
+ invalid_tool_processing_panel.append(workorder_id.processing_panel)
+ continue
+ # 查询功能刀具是否存在库存
+ functional_tools = self.env['sf.functional.cutting.tool.entity'].sudo().search(
+ [('tool_name_id', '=', tool_inventory_id.id), ('functional_tool_status', '=', '正常')])
+ if not functional_tools.filtered(lambda p: p.current_location in ('线边刀库', '机内刀库')):
+ missing_tool_1.append(tool_name) # 判断为 ('线边刀库', '机内刀库') 缺刀
+ if not functional_tools:
+ missing_tool_2.append(tool_name) # 判断为 库存缺刀
+ break
+ # 修改cnc程序的‘刀具状态’
+ workorder_ids = self.env['mrp.workorder'].sudo().search([('production_id', 'in', self.ids)])
+ if invalid_tool:
+ # 修改cnc程序的‘刀具状态’为 ‘无效刀’
+ cnc_ids = self.env['sf.cnc.processing'].sudo().search(
+ [('workorder_id', 'in', workorder_ids.ids), ('cutting_tool_name', 'in', invalid_tool)])
+ if cnc_ids:
+ cnc_ids.write({'tool_state': '2'})
+ # 创建制造订单无效刀检测结果记录
+ for production_id in self:
+ for processing_panel in list(set(invalid_tool_processing_panel)):
+ if not production_id.detection_result_ids.filtered(
+ lambda a: (a.processing_panel == processing_panel and a.detailed_reason == '无效功能刀具'
+ and a.handle_result == '待处理' and a.routing_type == 'CNC加工'
+ and a.rework_reason == 'programming' and a.test_results == '返工')):
+ production_id.detection_result_ids.create({
+ 'production_id': production_id.id,
+ 'processing_panel': processing_panel,
+ 'routing_type': 'CNC加工',
+ 'rework_reason': 'programming', # 原因:编程(programming)
+ 'detailed_reason': '无效功能刀具',
+ 'test_results': '返工',
+ 'handle_result': '待处理'
+ })
+ # 自动调用重新获取编程的方法
+ self[0].update_programming_state()
+ # 修改制造订单 编程状态变为“编程中”
+ self.write({'programming_state': '编程中', 'work_state': '编程中'})
+ if missing_tool_1:
+ # 修改 修改cnc程序的‘刀具状态’ 为 ‘缺刀’
+ cnc_ids = self.env['sf.cnc.processing'].sudo().search(
+ [('workorder_id', 'in', workorder_ids.ids), ('cutting_tool_name', 'in', missing_tool_1)])
+ if cnc_ids:
+ cnc_ids.write({'tool_state': '1'})
+ if missing_tool_2 and not invalid_tool:
+ # 调用CAM工单程序用刀计划创建方法
+ logging.info('调用CAM工单程序用刀计划创建方法!!!')
+ cnc_ids = self.env['sf.cnc.processing'].sudo().search(
+ [('workorder_id', 'in', workorder_ids.ids), ('cutting_tool_name', 'in', missing_tool_2)])
+ if cnc_ids:
+ self.env['sf.cam.work.order.program.knife.plan'].sudo().create_cam_work_plan(cnc_ids[0], list(
+ set(missing_tool_2)))
+ logging.info('工单cnc程序用刀校验完成!!!')
From 25a90f39668e70d97c6f9aa91bc4bd030e57d4e9 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Thu, 10 Oct 2024 17:31:56 +0800
Subject: [PATCH 3/4] =?UTF-8?q?1=E3=80=81=E8=8E=B7=E5=8F=96mrs=E7=BC=96?=
=?UTF-8?q?=E7=A8=8B=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96=EF=BC=8C=E9=87=8D?=
=?UTF-8?q?=E6=96=B0=E7=BC=96=E7=A8=8B=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=EF=BC=8C=E5=88=9B=E5=BB=BACAM=E6=96=B9=E6=B3=95=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=EF=BC=8Ccnc=E7=94=A8=E5=88=80=E6=A0=A1=E9=AA=8C?=
=?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_manufacturing/models/mrp_production.py | 2 +-
sf_mrs_connect/controllers/controllers.py | 2 +-
sf_tool_management/models/base.py | 16 +++++++++-------
sf_tool_management/models/mrp_workorder.py | 9 +++++----
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py
index dda99bfb..da54f77b 100644
--- a/sf_manufacturing/models/mrp_production.py
+++ b/sf_manufacturing/models/mrp_production.py
@@ -297,7 +297,7 @@ class MrpProduction(models.Model):
def update_programming_state(self):
try:
manufacturing_type = 'rework'
- if self.is_scrap is False:
+ if self.is_scrap:
manufacturing_type = 'scrap'
elif self.tool_state == '2':
manufacturing_type = 'invalid_tool_rework'
diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py
index 50383a19..37132097 100644
--- a/sf_mrs_connect/controllers/controllers.py
+++ b/sf_mrs_connect/controllers/controllers.py
@@ -25,7 +25,7 @@ class Sf_Mrs_Connect(http.Controller):
ret = json.loads(ret['result'])
logging.info('下发编程单:%s' % ret)
domain = [('programming_no', '=', ret['programming_no'])]
- if ret['manufacturing_type'] == 'scrap':
+ if ret['manufacturing_type'] in ('scrap', 'invalid_tool_rework'):
domain += [('state', 'not in', ['done', 'scrap', 'cancel'])]
productions = request.env['mrp.production'].with_user(
request.env.ref("base.user_admin")).search(domain)
diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py
index 56993ddb..c6a04196 100644
--- a/sf_tool_management/models/base.py
+++ b/sf_tool_management/models/base.py
@@ -314,27 +314,28 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
'applicant': None,
'sf_functional_tool_assembly_id': None})
- def create_cam_work_plan(self, cnc_processing, missing_tools):
+ def create_cam_work_plan(self, cnc_ids):
"""
根据传入的工单信息,查询是否有需要的功能刀具,如果没有则生成CAM工单程序用刀计划
"""
# 获取编程单号
- programming_no = cnc_processing.workorder_id.production_id.programming_no
+ programming_no = cnc_ids[0].workorder_id.production_id.programming_no
logging.info(f'编程单号:{programming_no}')
- for missing_tool in missing_tools:
+ for cnc_processing in cnc_ids:
+ tool_name = cnc_processing.cutting_tool_name
cam_id = self.env['sf.cam.work.order.program.knife.plan'].sudo().search(
[('programming_no', '=', programming_no),
- ('functional_tool_name', '=', missing_tool)])
+ ('functional_tool_name', '=', tool_name)])
if cam_id:
- logging.info(f'CAM装刀计划:{cam_id}')
+ logging.info(f'编程单号{programming_no}功能刀具名称{tool_name}已存在CAM装刀计划:{cam_id}')
else:
knife_plan = self.env['sf.cam.work.order.program.knife.plan'].sudo().create({
'name': cnc_processing.workorder_id.production_id.name,
'programming_no': programming_no,
'cam_procedure_code': cnc_processing.program_name,
'filename': cnc_processing.cnc_id.name,
- 'functional_tool_name': missing_tool,
+ 'functional_tool_name': tool_name,
'cam_cutter_spacing_code': cnc_processing.cutting_tool_no,
'process_type': cnc_processing.processing_type,
'margin_x_y': float(cnc_processing.margin_x_y),
@@ -344,9 +345,10 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
'shank_model': cnc_processing.cutting_tool_handle_type,
'estimated_processing_time': cnc_processing.estimated_processing_time,
})
- logging.info('CAM工单程序用刀计划创建成功!!!')
+ logging.info(f'创建CAM工单程序用刀计划:{knife_plan}')
# 创建装刀请求
knife_plan.apply_for_tooling()
+ logging.info('CAM工单程序用刀计划创建已完成!!!')
def unlink_cam_plan(self, production):
for item in production:
diff --git a/sf_tool_management/models/mrp_workorder.py b/sf_tool_management/models/mrp_workorder.py
index 2fd58354..96198cbb 100644
--- a/sf_tool_management/models/mrp_workorder.py
+++ b/sf_tool_management/models/mrp_workorder.py
@@ -192,6 +192,7 @@ class MrpProduction(models.Model):
'handle_result': '待处理'
})
# 自动调用重新获取编程的方法
+ logging.info('cnc用刀校验到无效刀自动调用重新编程方法:update_programming_state()')
self[0].update_programming_state()
# 修改制造订单 编程状态变为“编程中”
self.write({'programming_state': '编程中', 'work_state': '编程中'})
@@ -203,10 +204,10 @@ class MrpProduction(models.Model):
cnc_ids.write({'tool_state': '1'})
if missing_tool_2 and not invalid_tool:
# 调用CAM工单程序用刀计划创建方法
- logging.info('调用CAM工单程序用刀计划创建方法!!!')
cnc_ids = self.env['sf.cnc.processing'].sudo().search(
- [('workorder_id', 'in', workorder_ids.ids), ('cutting_tool_name', 'in', missing_tool_2)])
+ [('workorder_id', 'in', workorder_ids.filtered(lambda a: a.production_id == self[0].id).ids),
+ ('cutting_tool_name', 'in', missing_tool_2)])
if cnc_ids:
- self.env['sf.cam.work.order.program.knife.plan'].sudo().create_cam_work_plan(cnc_ids[0], list(
- set(missing_tool_2)))
+ logging.info('调用CAM工单程序用刀计划创建方法!!!')
+ self.env['sf.cam.work.order.program.knife.plan'].sudo().create_cam_work_plan(cnc_ids)
logging.info('工单cnc程序用刀校验完成!!!')
From 70b3daad732bd50071e8ab944aabe3d9e77c5914 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Fri, 11 Oct 2024 17:53:12 +0800
Subject: [PATCH 4/4] =?UTF-8?q?1=E3=80=81=E5=88=A0=E9=99=A4=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E5=88=80=E5=85=B7tree=E8=A7=86=E5=9B=BE=E5=9B=BE?=
=?UTF-8?q?=E7=89=87=E5=AD=97=E6=AE=B5=EF=BC=9B2=E3=80=81=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E8=B4=A7=E4=BD=8D=E7=9C=8B=E6=9D=BF=E5=85=B3=E8=81=94?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5=EF=BC=9B3=E3=80=81?=
=?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=BC=96=E7=A8=8B=E5=8D=95=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E8=B0=83=E7=94=A8cnc=E7=94=A8=E5=88=80=E6=A0=A1=E9=AA=8C?=
=?UTF-8?q?=E6=96=B9=E6=B3=95=E6=B7=BB=E5=8A=A0=E6=8A=A5=E9=94=99=E5=A4=84?=
=?UTF-8?q?=E7=90=86=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_mrs_connect/controllers/controllers.py | 6 +++++-
sf_tool_management/views/functional_tool_views.xml | 1 -
sf_warehouse/models/model.py | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py
index 37132097..cb56287a 100644
--- a/sf_mrs_connect/controllers/controllers.py
+++ b/sf_mrs_connect/controllers/controllers.py
@@ -98,7 +98,11 @@ class Sf_Mrs_Connect(http.Controller):
})
# 对制造订单所以面的cnc工单的程序用刀进行校验
- productions.production_cnc_tool_checkout()
+ try:
+ productions.production_cnc_tool_checkout()
+ except Exception as e:
+ logging.info(f'对cnc工单的程序用刀进行校验报错:{e}')
+ return json.JSONEncoder().encode(res)
return json.JSONEncoder().encode(res)
else:
diff --git a/sf_tool_management/views/functional_tool_views.xml b/sf_tool_management/views/functional_tool_views.xml
index b2e71fb3..2b872053 100644
--- a/sf_tool_management/views/functional_tool_views.xml
+++ b/sf_tool_management/views/functional_tool_views.xml
@@ -10,7 +10,6 @@
-
diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py
index 97ef47e5..371e4a54 100644
--- a/sf_warehouse/models/model.py
+++ b/sf_warehouse/models/model.py
@@ -338,7 +338,7 @@ class ShelfLocation(models.Model):
_name = 'sf.shelf.location'
_inherit = ['printing.utils']
_description = '货位'
- _rec_name = 'barcode'
+ # _rec_name = 'barcode'
_order = 'id asc, create_date asc'
# current_location_id = fields.Many2one('sf.shelf.location', string='当前位置')