diff --git a/sf_sale/models/sale_order.py b/sf_sale/models/sale_order.py index 2aa6f644..73837271 100644 --- a/sf_sale/models/sale_order.py +++ b/sf_sale/models/sale_order.py @@ -371,15 +371,15 @@ class RePurchaseOrder(models.Model): pp.purchase_id = [(6, 0, [purchase_order.id])] # self.env.cr.commit() - @api.onchange('order_line') - def _onchange_order_line(self): - for order in self: - if order.order_line: - line = order.order_line - product = line.product_id - product_id = product.ids - if len(product_id) != len(line): - raise ValidationError('【%s】已存在,请勿重复添加' % product[-1].name) + # @api.onchange('order_line') + # def _onchange_order_line(self): + # for order in self: + # if order.order_line: + # line = order.order_line + # product = line.product_id + # product_id = product.ids + # if len(product_id) != len(line): + # raise ValidationError('【%s】已存在,请勿重复添加' % product[-1].name) def button_confirm(self): result = super(RePurchaseOrder, self).button_confirm()