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!')