新增退回调整

This commit is contained in:
jinling.yang
2024-11-12 11:43:40 +08:00
parent 026bf17a68
commit 8bbc65ef88
5 changed files with 102 additions and 79 deletions

View File

@@ -325,7 +325,8 @@ class ResMrpWorkOrder(models.Model):
@api.constrains('blocked_by_workorder_ids')
def _check_no_cyclic_dependencies(self):
if self.production_id.state not in ['rework'] and self.state not in ['rework']:
if self.production_id.state not in ['rework', 'technology_to_confirmed', 'pending_cam'] and self.state not in [
'rework']:
if not self._check_m2m_recursion('blocked_by_workorder_ids'):
raise ValidationError(_("您不能创建周期性的依赖关系."))