I want to make a field Unique with combination of two fields and it does not show on form
class shipment_charge(osv.osv):
_name = 'shipment.charge'
_columns = {
'type': fields.selection(list_type, 'Type', required=True, ),
'mode': fields.selection(list_mode, 'Mode', required=True, help=""),
'transit_time': fields.selection(list_transit_time, 'Transit Time', required=True, help=""),
'charges_key': fields.char('charges_key', size=64, help=""),
}
_sql_constraints = [
('charges_key_unique', 'unique (type, mode)', 'The Charges key is not Unique')
]