[FIX] hr_timesheet: in hr.analytic.timesheet.unlink(), unlink the parent first (to ensure uninstall works correctly).

bzr revid: vmt@openerp.com-20130321134837-10skwf3nymzdbgsv
This commit is contained in:
Vo Minh Thu
2013-03-21 14:48:37 +01:00
parent 19f7083698
commit ff8a2935a6
+2 -1
View File
@@ -74,8 +74,9 @@ class hr_analytic_timesheet(osv.osv):
toremove = {}
for obj in self.browse(cr, uid, ids, context=context):
toremove[obj.line_id.id] = True
super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context)
self.pool.get('account.analytic.line').unlink(cr, uid, toremove.keys(), context=context)
return super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context)
return True
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, company_id, unit=False, journal_id=False, context=None):