Hello Smithjohn45,
Yes, it can be achieved within Odoo like this method.
For case insensitive constraints you can always use Odoo Constraints instead of SQL.
Like this Example,
- List out all Data for Specific fields in one list and convert it in either ['Lower' or 'upper Case], Then check for the New Value with the 'in' operator, and return the opposite of result.
Code: (Object: 'res.company')
@api.constrains('name')
def _check_unique_company(self):
company_ids = self.search([]) - self
value = [x.name.lower() for x in company_ids]
if self.name and self.name.lower() in value:
raise ValidationError(_('The combination is already Exist'))
return True
Thanks..
For more information Contact us:- https://kanakinfosystems.com/odoo-development-services