Accept Merge Request #1418: (feature/程序用刀校验优化 -> develop)
Merge Request: 修改调用创建cam程序用刀计划方法的判断条件 Created By: @禹翔辉 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @禹翔辉 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1418
This commit is contained in:
@@ -12,7 +12,7 @@ class SFMessageWork(models.Model):
|
|||||||
_name = 'mrp.workorder'
|
_name = 'mrp.workorder'
|
||||||
_inherit = ['mrp.workorder', 'jikimo.message.dispatch']
|
_inherit = ['mrp.workorder', 'jikimo.message.dispatch']
|
||||||
|
|
||||||
@api.depends('production_availability', 'blocked_by_workorder_ids.state')
|
@api.depends('production_availability', 'blocked_by_workorder_ids.state', 'production_id.tool_state')
|
||||||
def _compute_state(self):
|
def _compute_state(self):
|
||||||
super(SFMessageWork, self)._compute_state()
|
super(SFMessageWork, self)._compute_state()
|
||||||
for workorder in self:
|
for workorder in self:
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class MrpProduction(models.Model):
|
|||||||
logging.info(f'库存缺刀:{missing_tool_2}')
|
logging.info(f'库存缺刀:{missing_tool_2}')
|
||||||
# 调用CAM工单程序用刀计划创建方法
|
# 调用CAM工单程序用刀计划创建方法
|
||||||
cnc_ids = self.env['sf.cnc.processing'].sudo().search(
|
cnc_ids = self.env['sf.cnc.processing'].sudo().search(
|
||||||
[('workorder_id', 'in', workorder_ids.filtered(lambda a: a.production_id == self[0].id).ids),
|
[('workorder_id', 'in', workorder_ids.filtered(lambda a: a.production_id == self[0]).ids),
|
||||||
('cutting_tool_name', 'in', missing_tool_2)])
|
('cutting_tool_name', 'in', missing_tool_2)])
|
||||||
if cnc_ids:
|
if cnc_ids:
|
||||||
logging.info('调用CAM工单程序用刀计划创建方法!!!')
|
logging.info('调用CAM工单程序用刀计划创建方法!!!')
|
||||||
|
|||||||
Reference in New Issue
Block a user