Thibault Delavallée (OpenERP) has proposed merging
lp:~openerp-dev/openobject-server/trunk-mail-state-tde into
lp:openobject-server.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-mail-state-tde/+merge/111357
Info: clean mailgateway, add a message_state for ex-'pending' state due to new
messages
read/unread behavior (receive email -> unread; when viewing form view ->
automatically read)
buttons "mark read / mark unread"
track in modules specific behavior of mailgateways to clean and update
--
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-mail-state-tde/+merge/111357
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-server/trunk-mail-state-tde.
=== modified file 'openerp/addons/base/ir/ir_needaction.py'
--- openerp/addons/base/ir/ir_needaction.py 2012-04-18 14:56:48 +0000
+++ openerp/addons/base/ir/ir_needaction.py 2012-06-21 08:52:22 +0000
@@ -129,13 +129,20 @@
for id in ids:
res[id] = uid in needaction_user_ids[id]
return res
+
+ def search_needaction_pending(self, cr, uid, self_again, field_name, criterion, context=None):
+ ids = self.needaction_get_record_ids(
+ cr, uid, uid, limit=False, context=context)
+ return [('id', 'in', ids)]
_columns = {
- 'needaction_pending': fields.function(get_needaction_pending, type='boolean',
- string='Need action pending',
- help='If True, this field states that users have to perform an action. \
- This field comes from the needaction mechanism. Please refer \
- to the ir.needaction_mixin class.'),
+ 'needaction_pending': fields.function(
+ get_needaction_pending, type='boolean',
+ fnct_search=search_needaction_pending,
+ string='Need action pending',
+ help="If True, this field states that users have to perform an action." \
+ " This field comes from the needaction mechanism." \
+ " Please refer to the ir.needaction_mixin class."),
}
#------------------------------------------------------
@@ -146,7 +153,7 @@
""" Returns the user_ids that have to perform an action
:return: dict { record_id: [user_ids], }
"""
- return dict.fromkeys(ids, [])
+ return dict((id,set()) for id in ids)
def create(self, cr, uid, values, context=None):
rel_obj = self.pool.get('ir.needaction_users_rel')
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp