Merge lp:~openerp-groupes/openobject-client-web/fix-calendar-color-limit-tfr into lp:~openerp-groupes/openobject-client-web/6.0

Proposed by tfr (Openerp)
Status: Merged
Merged at revision: 4493
Proposed branch: lp:~openerp-groupes/openobject-client-web/fix-calendar-color-limit-tfr
Merge into: lp:~openerp-groupes/openobject-client-web/6.0
Diff against target: 21 lines (+2/-3)
1 file modified
addons/view_calendar/widgets/_base.py (+2/-3)
To merge this branch: bzr merge lp:~openerp-groupes/openobject-client-web/fix-calendar-color-limit-tfr
Reviewer Review Type Date Requested Status
OpenERP Groupe S Pending
Review via email: mp+83289@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/view_calendar/widgets/_base.py'
2--- addons/view_calendar/widgets/_base.py 2011-01-17 11:57:11 +0000
3+++ addons/view_calendar/widgets/_base.py 2011-11-24 13:20:09 +0000
4@@ -254,16 +254,15 @@
5 if self.options and self.options.get('_terp_color_filters'):
6 clr_field = self.options['_terp_color_filters']
7 else:
8- search_limit = 10
9 need_to_add_the_user_to_the_list_of_users = False
10 if self.context and self.color_field and \
11 self.context.get('search_default_user_id') and \
12 self.color_field == 'user_id' and \
13 self.fields[self.color_field].get('relation') == 'res.users':
14 need_to_add_the_user_to_the_list_of_users = True
15- clr_field = rpc.RPCProxy(self.fields[self.color_field]['relation']).search([], 0, search_limit, 0, ctx)
16+ clr_field = rpc.RPCProxy(self.fields[self.color_field]['relation']).search([], 0, 0, 0, ctx)
17 if need_to_add_the_user_to_the_list_of_users and self.context.get('search_default_user_id') not in clr_field:
18- clr_field[search_limit-1] = self.context.get('search_default_user_id')
19+ clr_field.append(self.context.get('search_default_user_id'))
20
21 domain.append((self.color_field, 'in', clr_field))
22

Subscribers

People subscribed via source and target branches