From 3f185feeaef2a1e00df31f11736d933adea4a630 Mon Sep 17 00:00:00 2001 From: jam-openerp Date: Mon, 17 Jan 2011 12:54:03 +0530 Subject: [PATCH 1/3] [IMP] caldav : Usabality of the import ics wizard bzr revid: jam@tinyerp.com-20110117072403-flk8m9owidlfk5o4 --- addons/caldav/wizard/calendar_event_import_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/caldav/wizard/calendar_event_import_view.xml b/addons/caldav/wizard/calendar_event_import_view.xml index e580e6b2733..a4dbd5ac8d0 100644 --- a/addons/caldav/wizard/calendar_event_import_view.xml +++ b/addons/caldav/wizard/calendar_event_import_view.xml @@ -9,7 +9,7 @@
- + From 390a32d7db87bb710ccaa977bd24ce9d416b62cf Mon Sep 17 00:00:00 2001 From: jam-openerp Date: Mon, 17 Jan 2011 17:09:48 +0530 Subject: [PATCH 2/3] [IMP/ADD] project_long_term : 1) Improved the Phase sheduling Wizard warning messages 2) Addedd waraning message for Task Scheduling wizard bzr revid: jam@tinyerp.com-20110117113948-eoc37olm4iorqe02 --- addons/project_long_term/project_long_term.py | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index a795dd76dee..0e605ed4331 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -364,7 +364,12 @@ def Phase_%d(): # Allocating Memory for the required Project and Pahses and Resources exec(func_str) Phase = eval('Phase_%d' % phase.id) - phase = Task.BalancedProject(Phase) + phase = None + try: + phase = Task.BalancedProject(Phase) + except : + raise osv.except_osv(_('Error !'),_('Phase Scheduling is not possible.\nProject should have the Start date and member for scheduling.')) + for task_id in task_ids: task = eval("phase.Task_%d" % task_id) @@ -510,7 +515,8 @@ def Project_%d(): try: project = Task.BalancedProject(Project) except : - raise osv.except_osv(_('Error !'),_('Invalid resource allocation, Phase Scheduling is not possible.\nPlease check project member resource.')) + raise osv.except_osv(_('Error !'),_('Phase Scheduling is not possible.\nProject should have the Start date and member for scheduling.')) + for phase_id in phase_ids: act_phase = phase_pool.browse(cr, uid, phase_id, context=context) resources = act_phase.resource_ids @@ -573,7 +579,10 @@ def Project_%d(): #Creating resources using the member of the Project u_ids = [i.id for i in project.members] resource_objs = resource_pool.generate_resources(cr, uid, u_ids, calendar_id, context=context) - start_date = datetime.strftime((datetime.strptime(start_date, "%Y-%m-%d")), "%Y-%m-%d") + try: + start_date = datetime.strftime((datetime.strptime(start_date, "%Y-%m-%d")), "%Y-%m-%d") + except: + raise osv.except_osv(_('Error !'),_('Task Scheduling is not possible.\nProject should have the Start date for scheduling.')) func_str = '' start = start_date minimum_time_unit = 1 @@ -634,7 +643,12 @@ def Project_%d(): # Allocating Memory for the required Project and Pahses and Resources exec(func_str) Project = eval('Project_%d' % project.id) - project = Task.BalancedProject(Project) + project = None + try: + project = Task.BalancedProject(Project) + except : + raise osv.except_osv(_('Error !'),_('Phase Scheduling is not possible.\nProject should have the Start date and member for scheduling.')) + for task_id in task_ids: task = eval("project.Task_%d" % task_id) start_date = task.start.to_datetime() From 008fb8b7f2188f4419a594d09257a650cd02c332 Mon Sep 17 00:00:00 2001 From: jam-openerp Date: Mon, 17 Jan 2011 17:14:21 +0530 Subject: [PATCH 3/3] [ADD] caldav : caldav synchronization wizard added new field to link online caldav documentation bzr revid: jam@tinyerp.com-20110117114421-wkv8h9mldsg8f8a7 --- addons/caldav/wizard/caldav_browse.py | 6 ++++-- addons/caldav/wizard/caldav_browse_view.xml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/caldav/wizard/caldav_browse.py b/addons/caldav/wizard/caldav_browse.py index dfb7385931f..a71f6043fea 100644 --- a/addons/caldav/wizard/caldav_browse.py +++ b/addons/caldav/wizard/caldav_browse.py @@ -237,7 +237,8 @@ class user_preference(osv.osv_memory): 'collection' :fields.many2one('document.directory', "Calendar Collection", required=True, domain = [('calendar_collection', '=', True)]), 'calendar' :fields.many2one('basic.calendar', 'Calendar', required=True), 'service': fields.selection([('webdav','CalDAV')], "Services"), - 'device' : fields.selection([('other', 'Other'), ('iphone', 'iPhone'), ('android', 'Android based device'),('thunderbird', 'Sunbird/Thunderbird'), ('evolution','Evolution')], "Software/Devices") + 'device' : fields.selection([('other', 'Other'), ('iphone', 'iPhone'), ('android', 'Android based device'),('thunderbird', 'Sunbird/Thunderbird'), ('evolution','Evolution')], "Software/Devices"), + 'doc_link':fields.char('Caldav Documentation', size="264", help="The link to Caldav Online Documentation.", readonly=True), } def _get_default_calendar(self, cr, uid, context): @@ -260,7 +261,8 @@ class user_preference(osv.osv_memory): 'service': 'webdav', 'collection' : _get_default_collection, 'calendar' : _get_default_calendar, - 'device' : 'other' + 'device' : 'other', + 'doc_link' : 'http://doc.openerp.com/' } def open_window(self, cr, uid, ids, context=None): diff --git a/addons/caldav/wizard/caldav_browse_view.xml b/addons/caldav/wizard/caldav_browse_view.xml index dc3e53b0627..29a0675eea9 100644 --- a/addons/caldav/wizard/caldav_browse_view.xml +++ b/addons/caldav/wizard/caldav_browse_view.xml @@ -37,6 +37,7 @@ +