Merge lp:~openerp-dev/openobject-addons/trunk-calendar_recurrent_meetings-jap into lp:openobject-addons

Proposed by Jagdish Panchal (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-calendar_recurrent_meetings-jap
Merge into: lp:openobject-addons
Diff against target: 44 lines (+3/-6)
1 file modified
base_calendar/base_calendar.py (+3/-6)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-calendar_recurrent_meetings-jap
Reviewer Review Type Date Requested Status
Jagdish Panchal (Open ERP) (community) Needs Resubmitting
qdp (OpenERP) Needs Information
Review via email: mp+156767@code.launchpad.net

Description of the change

Hello,

I have improve code for Recurrent meetings as per specification.

Thanks
JAP

To post a comment you must log in.
Revision history for this message
qdp (OpenERP) (qdp) wrote :

1) the domain is really weird, i guess that, by luck, there are always another argument following that is making a 'OR' with our clause, while the previous is combined with an 'AND'... And what we want is the contrary, isn't it?

so it should be
new_args = ['|','|', ('recurrency','=',1),('recurrent_id_date', arg[1], arg[2])] + original_arg

2) i don't get the reason of changing & to |... can you explain?

review: Needs Information
8661. By Jagdish Panchal (Open ERP)

[IMP] Imporve code for recurrent meeting

8662. By Jagdish Panchal (Open ERP)

[MERGE] Merge with main branch

8663. By Jagdish Panchal (Open ERP)

[IMP] Improve code

8664. By Jagdish Panchal (Open ERP)

[MERGE] Merge with main branch

Revision history for this message
Jagdish Panchal (Open ERP) (jap-openerp) wrote :

Hello,

Improve code as per suggetion.

Thanks
JAP

review: Needs Resubmitting
8665. By Jignesh Rathod(OpenERP)

[MERGE] merge wuth latest trunk

8666. By Nimesh Contractor(Open ERP)

[MERGE] with trunk.

Unmerged revisions

8666. By Nimesh Contractor(Open ERP)

[MERGE] with trunk.

8665. By Jignesh Rathod(OpenERP)

[MERGE] merge wuth latest trunk

8664. By Jagdish Panchal (Open ERP)

[MERGE] Merge with main branch

8663. By Jagdish Panchal (Open ERP)

[IMP] Improve code

8662. By Jagdish Panchal (Open ERP)

[MERGE] Merge with main branch

8661. By Jagdish Panchal (Open ERP)

[IMP] Imporve code for recurrent meeting

8660. By Jagdish Panchal (Open ERP)

[MERGE] Merge with main addons branch

8659. By Jagdish Panchal (Open ERP)

[IMP] base_calendar: improve code for recurrent meeting display in next month

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_calendar/base_calendar.py'
2--- base_calendar/base_calendar.py 2013-04-15 10:23:49 +0000
3+++ base_calendar/base_calendar.py 2013-06-06 13:03:29 +0000
4@@ -1001,7 +1001,6 @@
5 @param context: A standard dictionary for contextual values
6 @return: dictionary of rrule value.
7 """
8-
9 result = {}
10 if not isinstance(ids, list):
11 ids = [ids]
12@@ -1277,7 +1276,6 @@
13 if freq:
14 interval_srting = data.get('interval') and (';INTERVAL=' + str(data.get('interval'))) or ''
15 res = 'FREQ=' + freq.upper() + get_week_string(freq, data) + interval_srting + get_end_date(data) + get_month_string(freq, data)
16-
17 return res
18
19 def _get_empty_rrule_data(self):
20@@ -1350,21 +1348,20 @@
21 if context is None:
22 context = {}
23 new_args = []
24-
25 for arg in args:
26 new_arg = arg
27 if arg[0] in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')):
28 if context.get('virtual_id', True):
29- new_args += ['|','&',('recurrency','=',1),('recurrent_id_date', arg[1], arg[2])]
30+ new_args += ['|','|','&',('recurrency','=',1),('recurrent_id_date', arg[1], arg[2])]
31+ new_args += ['&',('recurrency','=',1),('end_date','>=',arg[2])]
32 elif arg[0] == "id":
33 new_id = get_real_ids(arg[2])
34 new_arg = (arg[0], arg[1], new_id)
35 new_args.append(new_arg)
36-
37 #offset, limit and count must be treated separately as we may need to deal with virtual ids
38 res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=order, context=context, count=False)
39 if context.get('virtual_id', True):
40- res = self.get_recurrent_ids(cr, uid, res, new_args, limit, context=context)
41+ res = self.get_recurrent_ids(cr, uid, res, args, limit, context=context)
42 if count:
43 return len(res)
44 elif limit:

Subscribers

People subscribed via source and target branches

to all changes: