From e5f15661ce58d4c4b785764cc69b71cb8458111d Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Tue, 14 Jan 2025 15:10:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8D=95=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E9=99=90=E5=88=B6=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_sale/models/sale_order.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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()