Merge branch 'feature/功能刀具组装流程测试及优化' into feature/功能刀具组装流程优化完成

This commit is contained in:
yuxianghui
2024-04-17 14:57:39 +08:00
19 changed files with 1516 additions and 1247 deletions

View File

@@ -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'