同步日历(CalDAV)¶
自从OpenERP 6.0版本后, document_webdav
v2.2, OpenERP CalDAV模块就开始iphone的日历客户端.当然android也同样的支持。
However, keep in mind that OpenERP is not a straightforward calendaring server, but an ERP application (with more data + structure) which exposes those data to calendar clients. That said, the full features that would be accessible through the GTK or Web OpenERP clients cannot be included into Calendar clients (such as iPhone).
OpenERP Server 配置¶
Some modules need to be installed on the OpenERP server. These are:
caldav
: Required, has the reference setup and the necessary- underlying code. Will also cause document & document_webdav to be installed.
crm_caldav
: Optional, will export the CRM Meetings as a calendar.project_caldav
: Optional, will export project tasks as a calendar.
http_well_known
: Optional, experimental. Will ease bootstrapping,- but only when a DNS srv record is also used.
When you install the above module(s), a ready-to-go reference setup of the folders is provided. The OpenERP administrator can add more calendars and (re)structure if needed.
SSL 配置¶
It is highly advisable that you also set up SSL to work for the OpenERP server. HTTPS is a server-wide feature in OpenERP, which means a certificate will be set at the openerp-server.conf which will be the same for XML-RPC, HTTP, WebDAV and CalDAV. The iPhone also supports secure connections with SSL, although it does not expect a self-signed certificate (or one that is not verified by one of the “big” certificate authorities).
iPhone 设备日历¶
To set up the calendars, proceed as follows:
- Click
Settings
and go to theMail, Contacts, Calendars
page. - Go to
Add account...
- Click
Other
. - From the
Calendars
group, selectAdd CalDAV Account
. - Enter the host name. (e.g. if the URL is http://openerp.com:8069/webdav/db_1/calendars/ , openerp.com is the host)
Tip
Go to
and selectIphone
. Then the Caldav server will be shown.
- In
Username
andPassword
, type your OpenERP login and password. - As a description, you can either leave the server’s name or something like “OpenERP calendars”.
- If you are not using a SSL server, you will get an error, do not worry and push “Continue”
- Then click “Advanced Settings” to specify the correct ports and paths.
- Specify the port for the OpenERP server: 8071 for SSL, 8069 without SSL.
- Set the
Account URL
to the right path of the OpenERP webdav: the URL given by the wizard (e.g. http://my.server.ip:8069/webdav/dbname/calendars/ ) - Click
Done
. The phone will connect to the OpenERP server and verify whether the account can be used. - Go to the main menu of the iPhone and open the Calendar application. Your OpenERP calendars will be visible inside the selection of the “Calendars” button. Note that when creating a new calendar entry, you will have to specify which calendar it should be saved to.
If you need SSL (and your certificate is not a verified one), you will first need to let the iPhone trust the certificate. Follow these steps:
- Open Safari and enter the HTTPS location of the OpenERP server: https://my.server.ip:8071/ (assuming you have the server at “my.server.ip” and the HTTPS port is the default 8071)
- Safari will try to connect and issue a warning about the certificate used. Inspect the certificate and click “Accept” so that iPhone now trusts it.
Android 设备日历¶
使用条件¶
There is no built-in way to synchronize calendars with CalDAV. So you need to install a third party software: Calendar (CalDav) Sync BETA from Hypermatix Software (for now, it is the only one).
配置步骤¶
- 打开
Calendar Sync
应用. 打开后,界面上应该会有两个页面. - 在 Connection 页面中, 找到 CalDAV 日历链接, 输入你的OpenERP 日历地址 “http://my.server.ip:8069/webdav/dbname/calendars/users/demo/c/Meetings” 。
Tip
Go to
and selectAndroid
. Then the Caldav server link will be shown. Make sure to use the correct XML-RPC port, it may differ from 8069.
- 输入你的OpenERP帐户及密码.
- 如果你的OpenERP没有配置SSL,会接受一个关于SSL的警告,请选择
Yes
. - Then you can synchronize manually or customize the settings (Sync tab) to synchronize every X minutes.
Evolution 日历¶
Go to Calendar View.
.
Enter the data in the form:
- Type : CalDav
- Name : Whatever you want (e.g. Meeting)
- URL : http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (e.g. http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings) the one given on top of this window
- Uncheck “User SSL”
- Username : Your username (e.g. Demo)
- Refresh : every time you want Evolution to synchronize the data with the server
Tip
Go to
and selectEvolution
. Then the Caldav server will be shown.
- Click OK and enter your OpenERP password.
- A new calendar with the name you entered should appear on the left side.
Sunbird/Lightning 日历¶
使用条件¶
If you are using Thunderbird, first install the Lightning module http://www.mozilla.org/projects/calendar/lightning/
配置¶
- Go to Calendar View.
- .
- Choose
On the Network
. - As a format, select CalDav and as a location type the URL (e.g. http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings).
Tip
Go to
and selectSunbird/Lightning
. Then the Caldav server will be shown.)
- Choose a name and a colour for the Calendar, and we advice you to uncheck “alarm”.
- Enter your OpenERP login and password (to give the password only once, check the box
Use Password Manager to remember this password
). - Then click Finish; your meetings should now appear in your Calendar view.