Browse Source

add unique constraints on `name` and `name_inverse`

pull/185/head
Charbel Jacquin 9 years ago
parent
commit
c5482db3cf
  1. 6
      partner_relations/model/res_partner_relation_type.py

6
partner_relations/model/res_partner_relation_type.py

@ -62,6 +62,12 @@ class ResPartnerRelationType(models.Model):
default=False,
)
_sql_constraints = [
('name_unique', 'unique(name)', 'partner relation name already exists!'),
('name_inverse_unique', 'unique(name_inverse)',
'partner relation name_inverse already exists!'),
]
@api.model
def _get_partner_types(self):
return [

Loading…
Cancel
Save