[FIX] account_followup: no need to have 'Only One Followup by Company' constraint

bzr revid: nel@tinyerp.com-20120223092424-020pozo0sl4hw2tg
This commit is contained in:
Najlaâ 2012-02-23 10:24:24 +01:00
parent cc193c268e
commit f2e81931f2
1 changed files with 0 additions and 14 deletions

View File

@ -34,20 +34,6 @@ class followup(osv.osv):
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
}
def check_company_uniq(self, cr, uid, ids, context=None):
sr_id = self.search(cr,uid,[],context=context)
lines = self.browse(cr, uid, sr_id, context=context)
company = []
for l in lines:
if l.company_id.id in company:
return False
if l.company_id.id not in company:
company.append(l.company_id.id)
return True
_constraints = [
(check_company_uniq, 'Only One Followup by Company.',['company_id'] )
]
followup()
class followup_line(osv.osv):