[MERGE] 'My Second Not-Chatter Merge of the Day': add a deprecated attribute on fields.

This revision adds a string 'deprecated' attribute on fields. This addons-side merge is a small addition to be used as an example. The 'member_ids' field of mail.group is set as deprecated, as it will disappear when merging openchater-3-5-followers task, putting a real follower_ids fields on mail.thread objects.

bzr revid: tde@openerp.com-20120814111111-xq9ddv5w3favht93
This commit is contained in:
Thibault Delavallée 2012-08-14 13:11:11 +02:00
commit 2edf42928b
1 changed files with 4 additions and 2 deletions

View File

@ -122,9 +122,11 @@ class mail_group(osv.osv):
"resized as a 50x50px image, with aspect ratio preserved. "\
"Use this field anywhere a small image is required."),
'member_ids': fields.function(get_member_ids, fnct_search=search_member_ids,
type='many2many', relation='res.users', string='Group members', multi='get_member_ids'),
type='many2many', relation='res.users', string='Group members', multi='get_member_ids',
deprecated='This field will be deleted in a few hours or days, so please do not use it.'),
'member_count': fields.function(get_member_ids, type='integer',
string='Member count', multi='get_member_ids'),
string='Member count', multi='get_member_ids',
deprecated='This field will be deleted in a few hours or days, so please do not use it.'),
'is_subscriber': fields.function(get_member_ids, type='boolean',
string='Joined', multi='get_member_ids'),
'last_month_msg_nbr': fields.function(get_last_month_msg_nbr, type='integer',