From c34ac7f9de769c742b5887f3b1fa92d58dc1d238 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 26 Jun 2012 16:38:10 +0530 Subject: [PATCH] [IMP]when contracts to renew it should be bold and contracts to renew shows number of contract to renew bzr revid: sgo@tinyerp.com-20120626110810-fnd83hdm77ghcbzm --- addons/account/project/project_view.xml | 3 ++- addons/analytic/analytic.py | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index e1fc04cef58..91a414b87a2 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -8,7 +8,8 @@ tree - + + diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 798f6afa4ff..afcc2e19d52 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -27,7 +27,7 @@ import decimal_precision as dp class account_analytic_account(osv.osv): _name = 'account.analytic.account' - _inherit = ['mail.thread'] + _inherit = ['ir.needaction_mixin','mail.thread'] _description = 'Analytic Account' def _compute_level_tree(self, cr, uid, ids, child_ids, res, field_names, context=None): @@ -285,6 +285,13 @@ class account_analytic_account(osv.osv): # ------------------------------------------------ # OpenChatter methods and notifications # ------------------------------------------------ + def get_needaction_user_ids(self, cr, uid, ids, context=None): + result = dict.fromkeys(ids, []) + for obj in self.browse(cr, uid, ids, context=context): + if obj.state == 'pending': + result[obj.id] = [obj.user_id.id] + return result + def create_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): self.message_subscribe(cr, uid, [obj.id], [obj.user_id.id], context=context)