CNC获取程序工单自动开始 并获取cnc程序到mrs编程单

This commit is contained in:
gqh
2023-02-16 17:48:26 +08:00
parent a3f350b69c
commit 9d59917af9
2 changed files with 14 additions and 9 deletions

View File

@@ -136,6 +136,7 @@ class MrpProduction(models.Model):
for workorder in production.workorder_ids:
workorder.duration_expected = workorder._get_duration_expected()
#在之前的销售单上重新生成制造订单
def create_production1_values(self, production):
production_values_str = {'origin': production.origin,
@@ -232,6 +233,9 @@ class MrpProduction(models.Model):
for work in rec.workorder_ids:
work.sequence = current_sequence
current_sequence += 1
if work.name == '获取CNC加工程序':
work.button_start()
work.fetchCNC()
#创建工单并进行排序
def _create_workorder(self):