修复配送完成修改工件配送单的bug
This commit is contained in:
@@ -1657,14 +1657,14 @@ class WorkPieceDelivery(models.Model):
|
||||
obj.feeder_station_start_id.name, obj.feeder_station_destination_id.name)
|
||||
return obj
|
||||
|
||||
@api.constrains('route_id')
|
||||
def _check_route_id(self):
|
||||
if self.type == '运送空料架':
|
||||
if self.route_id and self.name is False:
|
||||
route = self.sudo().search(
|
||||
[('route_id', '=', self.route_id.id), ('id', '!=', self.id), ('name', 'ilike', '运送空料架路线')])
|
||||
if route:
|
||||
raise UserError("该任务路线已存在,请重新选择")
|
||||
# @api.constrains('route_id')
|
||||
# def _check_route_id(self):
|
||||
# if self.type == '运送空料架':
|
||||
# if self.route_id and self.name is False:
|
||||
# route = self.sudo().search(
|
||||
# [('route_id', '=', self.route_id.id), ('id', '!=', self.id), ('name', 'ilike', '运送空料架路线')])
|
||||
# if route:
|
||||
# raise UserError("该任务路线已存在,请重新选择")
|
||||
|
||||
# @api.constrains('name')
|
||||
# def _check_name(self):
|
||||
|
||||
Reference in New Issue
Block a user