Improve _check function for single id
bzr revid: ced-e4c3052ce9159695dcfa184282cd32ad8108eb56
This commit is contained in:
parent
bf9abac6c1
commit
9e8ee22b93
|
@ -88,7 +88,10 @@ class account_analytic_line(osv.osv):
|
|||
context=context)
|
||||
|
||||
def _check(self, cr, uid, ids):
|
||||
for line in self.browse(cr, uid, ids):
|
||||
select = ids
|
||||
if isinstance(select, (int, long)):
|
||||
select = [ids]
|
||||
for line in self.browse(cr, uid, select):
|
||||
if line.invoice_id:
|
||||
raise osv.except_osv('Error !',
|
||||
'You can not modify an invoiced analytic line!')
|
||||
|
|
Loading…
Reference in New Issue