WebDAV
WebDAV (Web-based Distributed Authoring and Versioning) is an open, published standard that allows you to edit documents on a remote web server.
WebDAV supports the following features:
- Editing: Create, update, and delete files.
- Properties: Store metadata such as titles, author names, and publication dates. You can set, delete, and retrieve these metadata.
- Collections: Group resources into collections that are organized like a file system, similar to a directory or desktop folder.
- Locking:Use locks to prevent others from editing the same content you’re working on in WebDAV. The duration of the locks is independent of any individual network connection.Configure WebDAV in OpenERP
WebDAV in OpenERP can be used for navigating documents ie, openobject attachments
as mentioned above.Follow these procedures to install webdav on OpenERP-6
1. ssh to openerp server and install following packages
easy_install pywebdav
2. edit the configuration file and add the following
[webdav]
enable = True
vdir = webdav
3. install the module “document_webdav” in openerp
4. restart openerp server
5. login to openerp and go to “Knowledge->Configuration->Document management->
DAV properties for folders”
6. create a new record with following contents and save it.
Namespace: DAV
Name: Documents
Directory: Documents
Substitute: yes
Value: (‘href’,’DAV:’,’/%s/%s/Documents/%s’ % (‘webdav’,dbname, username ) )
7. Now you can access the folder “Documents” by mounting the webdav folder
using url “http://DOMAIN.TLD:XMPRPC-PORT/webdav/DBNAME/Documents”
8. To map all folders for partners go to “Knowledge->Configuration->Document management->Directories”
and create and save a new record with the following
Name: All_Partners
Parent Directory: Documents
Type: Folders per resource
Resource: Partner
Domain: [ ]
Find all resources: yes
9. Now you can access all documents associated with partners in the folder “All_Partners”
in the mounted webdav.
——
Synchronizing your Calendars (CalDAV)¶
As from OpenERP Version 6.0, document_webdav v2.2, the iPhone has been thoroughly tested and is now supported as a Calendaring client for the OpenERP CalDAV module. The same applies to the Android phones, of course.
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 Setup
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 Setup
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).
Calendars on iPhone
To set up the calendars, proceed as follows:
- Click Settings and go to the Mail, Contacts, Calendars page.
- Go to Add account...
- Click Other.
- From the Calendars group, select Add 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 Sales ‣ Meetings ‣ Synchronize this Calendar and select Iphone. Then the Caldav server will be shown.
- In Username and Password, 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.
Calendars on Android
Prerequisites
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).
How to Configure?
- Open the Calendar Sync application. You get an interface with 2 tabs.
- On the Connection tab, in CalDAV Calendar URL, type a URL such as http://my.server.ip:8069/webdav/dbname/calendars/users/demo/c/Meetings.
Tip
Go to Sales ‣ Meetings ‣ Synchronize this Calendar and select Android. Then the Caldav server link will be shown. Make sure to use the correct XML-RPC port, it may differ from 8069.
- Type your OpenERP username and password.
- If your server does not use SSL, you will get a warning. Answer Yes.
- Then you can synchronize manually or customize the settings (Sync tab) to synchronize every X minutes.
Calendars in Evolution
- Go to Calendar View.
- File ‣ New ‣ Calendar.
- 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 Sales ‣ Meetings ‣ Synchronize this Calendar and select Evolution. 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.
Calendars in Sunbird/Lightning
Prerequisites
If you are using Thunderbird, first install the Lightning module http://www.mozilla.org/projects/calendar/lightning/
Configuration
- Go to Calendar View.
- File ‣ New Calendar.
- 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 Sales ‣ Meetings ‣ Synchronize this Calendar and select Sunbird/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.
Dear André,
Would your approach to enabling CALDAV still be valid for Odoo 9?
I can’t seem to find any info on the caldav module for Odoo 9.
Thanks,
Eric