修改创建表面工艺产品时表面工艺参数不能为空的问题
This commit is contained in:
@@ -1067,7 +1067,8 @@ class ResProductMo(models.Model):
|
|||||||
raise UserError('产品名称【%s】已存在' % item.name)
|
raise UserError('产品名称【%s】已存在' % item.name)
|
||||||
if item.categ_type == '表面工艺':
|
if item.categ_type == '表面工艺':
|
||||||
if len(self.search([('server_product_process_parameters_id', '=',
|
if len(self.search([('server_product_process_parameters_id', '=',
|
||||||
item.server_product_process_parameters_id.id)])) > 1:
|
item.server_product_process_parameters_id.id),('server_product_process_parameters_id', '!=',
|
||||||
|
False)])) > 1:
|
||||||
raise UserError('表面工艺参数为【%s】的产品已存在' % item.server_product_process_parameters_id.name)
|
raise UserError('表面工艺参数为【%s】的产品已存在' % item.server_product_process_parameters_id.name)
|
||||||
if "create_product_product" not in self._context:
|
if "create_product_product" not in self._context:
|
||||||
templates._create_variant_ids()
|
templates._create_variant_ids()
|
||||||
|
|||||||
Reference in New Issue
Block a user