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
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py 2013-04-15 10:23:49 +0000
+++ base_calendar/base_calendar.py 2013-06-06 13:03:29 +0000
@@ -1001,7 +1001,6 @@
1001 @param context: A standard dictionary for contextual values1001 @param context: A standard dictionary for contextual values
1002 @return: dictionary of rrule value.1002 @return: dictionary of rrule value.
1003 """1003 """
1004
1005 result = {}1004 result = {}
1006 if not isinstance(ids, list):1005 if not isinstance(ids, list):
1007 ids = [ids]1006 ids = [ids]
@@ -1277,7 +1276,6 @@
1277 if freq:1276 if freq:
1278 interval_srting = data.get('interval') and (';INTERVAL=' + str(data.get('interval'))) or ''1277 interval_srting = data.get('interval') and (';INTERVAL=' + str(data.get('interval'))) or ''
1279 res = 'FREQ=' + freq.upper() + get_week_string(freq, data) + interval_srting + get_end_date(data) + get_month_string(freq, data)1278 res = 'FREQ=' + freq.upper() + get_week_string(freq, data) + interval_srting + get_end_date(data) + get_month_string(freq, data)
1280
1281 return res1279 return res
12821280
1283 def _get_empty_rrule_data(self):1281 def _get_empty_rrule_data(self):
@@ -1350,21 +1348,20 @@
1350 if context is None:1348 if context is None:
1351 context = {}1349 context = {}
1352 new_args = []1350 new_args = []
1353
1354 for arg in args:1351 for arg in args:
1355 new_arg = arg1352 new_arg = arg
1356 if arg[0] in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')):1353 if arg[0] in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')):
1357 if context.get('virtual_id', True):1354 if context.get('virtual_id', True):
1358 new_args += ['|','&',('recurrency','=',1),('recurrent_id_date', arg[1], arg[2])]1355 new_args += ['|','|','&',('recurrency','=',1),('recurrent_id_date', arg[1], arg[2])]
1356 new_args += ['&',('recurrency','=',1),('end_date','>=',arg[2])]
1359 elif arg[0] == "id":1357 elif arg[0] == "id":
1360 new_id = get_real_ids(arg[2])1358 new_id = get_real_ids(arg[2])
1361 new_arg = (arg[0], arg[1], new_id)1359 new_arg = (arg[0], arg[1], new_id)
1362 new_args.append(new_arg)1360 new_args.append(new_arg)
1363
1364 #offset, limit and count must be treated separately as we may need to deal with virtual ids1361 #offset, limit and count must be treated separately as we may need to deal with virtual ids
1365 res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=order, context=context, count=False)1362 res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=order, context=context, count=False)
1366 if context.get('virtual_id', True):1363 if context.get('virtual_id', True):
1367 res = self.get_recurrent_ids(cr, uid, res, new_args, limit, context=context)1364 res = self.get_recurrent_ids(cr, uid, res, args, limit, context=context)
1368 if count:1365 if count:
1369 return len(res)1366 return len(res)
1370 elif limit:1367 elif limit:

Subscribers

People subscribed via source and target branches

to all changes: