[FIX] _constraints : Multiple constraints on the same field should be allowed

bzr revid: ach@tinyerp.com-20100511083601-ne9n2ftq5lbohvwg
This commit is contained in:
Anup (OpenERP) 2010-05-11 14:06:01 +05:30
parent d8672f0f3a
commit ee6e52fac7
1 changed files with 2 additions and 1 deletions

View File

@ -253,7 +253,8 @@ class osv(osv_base, orm.orm):
for c in cls.__dict__.get(s, []):
exist = False
for c2 in range(len(new)):
if new[c2][2]==c[2]:
#For _constraints, we should check field and methods as well
if new[c2][2]==c[2] and new[c2][0]==c[0]:
new[c2] = c
exist = True
break