Merge branch 'feature/功能刀具组装流程测试及优化' into feature/功能刀具组装流程优化完成
This commit is contained in:
@@ -206,6 +206,16 @@ class RePurchaseOrder(models.Model):
|
||||
order.message_subscribe([order.partner_id.id])
|
||||
return True
|
||||
|
||||
@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)
|
||||
|
||||
|
||||
class ResPartnerToSale(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
Reference in New Issue
Block a user