class deduction_registration(osv.osv):
_name = "bpl.deduction.registration"
_description = "Deduction Registration"
_columns = {
'name': fields.char('Deduction Name', size=256, required=True),
}
_sql_constraints = [('deduction_registration_name_unique', 'unique(name)', 'Deduction name already exists')]
deduction_registration()
我为我的模型创建了上面的 sql 约束。但它仍然允许不区分大小写的重复记录。
像EPF和epf允许如何为此添加约束。?