Most Powerful Open Source ERP

How To Use ERP5 iCal Skin

How To showing how to use ERP5 RSS skin to display a listbox as iCal feed.
  • Last Update:2016-02-11
  • Version:001
  • Language:en

The ICal style, provided by erp5_ical_style bt5, renders any listbox in iCalendar 2.0 format. It can be used out-of-the-box to view content of any module or other folderish object in any calendar application (Lightning, KOrganizer, Lotus Notes etc). Use the stock Folder_viewContentListAsICal for this, using url like:

Table of Contents

Steps

http://[host]/erp5/sale_order_module/Folder_viewContentListAsICal

To use it in a client you have to provide login and password in the url, like:

Folder_viewContentListAsICal?__ac_name=[login]&__ac_password=[pass]

The iCalendar protocol distinguishes between "event" and "todo" - an event has a start and stop date, while a todo has an additional properties "status" and "percent_complete", all of which are supported. All items can be categorized (assigned to a category for grouping).

Default implementation

By default, ical_style behaves as follows:

  • portal_type Task is interpreted as a todo, anything else is an event
  • start_date and stop_date are passed on
  • if object has a source_project or follow_up and it has a reference, the reference is returned as item category (to group, for example, event related to the same sale opportunity)
  • a todo status and percent_complete are calculated based on the Task's workflow status

Customization

Overwite the item analysis scripts to change their presentation and classification:

Base_getICalCategory (categorization)
Base_getICalComponent (decides what is an event and what is a todo)
Base_getICalStatusItem (calculates status and percent_complete of a todo)

For more customization, overwrite Folder_viewContentListAsRSS or use your own form:

  • keep existing columns and do not change their labels (though you can change their definitions as you like)
  • there should be no need to can add more columns
  • keep listbox page template "Listbox_viewAsICal" and form page template "template_ical_style"

Related Articles