From 9e8ee22b936ae90863994e0fa98803feb826e680 Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 4 Oct 2007 05:58:52 +0000 Subject: [PATCH] Improve _check function for single id bzr revid: ced-e4c3052ce9159695dcfa184282cd32ad8108eb56 --- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 0b00a17fde8..0cd9b94e0f4 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -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!')