[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
This commit is contained in:
parent
2afd3ef644
commit
c34ac7f9de
|
@ -8,7 +8,8 @@
|
|||
<field name="type">tree</field>
|
||||
<field eval="8" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree toolbar="1" colors="blue:state=='pending';grey:state in ('cancelled','close');red:type=='view'" string="Analytic Accounts">
|
||||
<tree toolbar="1" fonts="bold:state=='pending',needaction_pending==True" colors="blue:state=='pending';grey:state in ('cancelled','close');red:type=='view'" string="Analytic Accounts">
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<field name="complete_name"/>
|
||||
<field name="code"/>
|
||||
<field name="quantity"/>
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue