From 809c4f1ed878b28c4f7a944121ee6e4691ce3f82 Mon Sep 17 00:00:00 2001 From: Saurang Suthar Date: Tue, 16 Oct 2012 18:50:12 +0530 Subject: [PATCH] [IMP]hr_timesheet_invoice:fixed the issue of traceback while closing or canceling the contract bzr revid: ssu@tinyerp.com-20121016132012-l8cmrr873syfvr1q --- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 4 ++-- .../hr_timesheet_invoice_data.xml | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index ab76f2b0f64..9db8eb04397 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -95,13 +95,13 @@ class account_analytic_account(osv.osv): def set_close(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state': 'close'}, context=context) message = _("Contract has been closed.") - self.message_post(cr, uid, ids, body=message, subtype="mt_account_closed", context=context) + self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_closed", context=context) return True def set_cancel(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state': 'cancelled'}, context=context) message = _("Contract has been canceled.") - self.message_post(cr, uid, ids, body=message, subtype="mt_account_canceled", context=context) + self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_canceled", context=context) return True def set_open(self, cr, uid, ids, context=None): diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml index 462888e0b39..5beb5928211 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_data.xml @@ -16,5 +16,16 @@ 50% 50.0 + + + + finished + account.analytic.account + + + canceled + account.analytic.account + +