1、修改工单检测结果只读条件;2、修改质检单完成时同步完成工单判断条件;3、去除只有配置后置三元检测的工单才能看到质检单对应字段、页签的判断条件
This commit is contained in:
@@ -62,7 +62,9 @@ class QualityCheck(models.Model):
|
||||
def do_pass(self):
|
||||
self.ensure_one()
|
||||
super().do_pass()
|
||||
if self.workorder_id and self.individuation_page_PTD is True:
|
||||
if self.workorder_id:
|
||||
if self.workorder_id.state in ('pending', 'waiting'):
|
||||
raise ValidationError('工单未就绪!')
|
||||
# 1)将页签“判定结果”的检测结果值同步到【工单_后置三元检测_检测结果】
|
||||
if self.test_results in ['返工', '报废']:
|
||||
raise ValidationError('请重新选择【判定结果】-【检测结果】')
|
||||
@@ -74,7 +76,9 @@ class QualityCheck(models.Model):
|
||||
def do_fail(self):
|
||||
self.ensure_one()
|
||||
super().do_fail()
|
||||
if self.workorder_id and self.individuation_page_PTD is True:
|
||||
if self.workorder_id:
|
||||
if self.workorder_id.state in ('pending', 'waiting'):
|
||||
raise ValidationError('工单未就绪!')
|
||||
# 1)将页签“判定结果”的检测结果值同步到【工单_后置三元检测_检测结果】
|
||||
if not self.test_results:
|
||||
raise ValidationError('请填写【判定结果】里的信息')
|
||||
|
||||
Reference in New Issue
Block a user