去掉客户部分字段必填校验和返工报废代码
This commit is contained in:
@@ -233,12 +233,12 @@ class ResPartnerToSale(models.Model):
|
||||
if obj:
|
||||
raise UserError('该税ID已存在,请重新输入')
|
||||
|
||||
@api.constrains('email')
|
||||
def _check_email(self):
|
||||
if self.customer_rank > 0:
|
||||
obj = self.sudo().search([('email', '=', self.email), ('id', '!=', self.id), ('active', '=', True)])
|
||||
if obj:
|
||||
raise UserError('该邮箱已存在,请重新输入')
|
||||
# @api.constrains('email')
|
||||
# def _check_email(self):
|
||||
# if self.customer_rank > 0:
|
||||
# obj = self.sudo().search([('email', '=', self.email), ('id', '!=', self.id), ('active', '=', True)])
|
||||
# if obj:
|
||||
# raise UserError('该邮箱已存在,请重新输入')
|
||||
|
||||
@api.model
|
||||
def _name_search(self, name, args=None, operator='ilike', limit=100, name_get_uid=None):
|
||||
|
||||
Reference in New Issue
Block a user