This module for Dolibarr 16.0/18.0 adds CardDAV / CalDAV and ICS synchronisation. It uses Dolibarr Sabre/DAV server library.
You can :
Each user can access his/her contacts and thirdparties address books (public and own private contacts), his/her own calendar and other users calendars according to his/her rights.
Dolibarr contact informations fill personnal informations in client software cards (including contact photo).
Society (thirdparty) informations (to which contact is attached) fill professional informations in client software cards.
Three adress books are proposed to sync : Contacts, Thirdparties and Members. If you want to modify a thirdparty infomation, do it in thirdparties address book.
It is possible to select which contacts to sync with CDAV_CONTACT_TAG configuration value in Home / Setup / Other setup. Enter a contact tag value and then only contacts with this tag will be synced (empty value for all).
Calendar records with "Status / Percentage" set to "Not applicable" are converted to events in CalDAV (VEVENT), others are converted to tasks (VTODO).
Recurring events are not handled (Dolibarr does not handle them).
Automatic tasks generation in projects with services from linked Propositions and/or Orders Module setup offer you to :
Durations are retrieved from service's card if defined (minutes, hours, days or weeks only), otherwise from extrafield filled in documents All tasks are begining at the starting date of the project, at the begining of the working day Multi-day durations tasks are maintained as a single task, eg from 31/07/2018 at 8am to 02/08/2018 at 7pm
Usage :
Notes :
If you find the module is useful and want to finance improvements, consider to pay it on Dolistore
PHP 8.0+ is required.
Dolibarr native calendar module must be activated before installing CDav module.
Enable CDav module in Interfaces Modules list.
It would add a link in Agenda left menu and in Contacts left menu to access DAV / ICS URLs.
Use these URLs in your CardDAV or CalDAV client software.
Thunderbird (with Lightning, TBSync and its Provider for CalDAV/CardDAV addons) needs a precise URL for each address book and calendar :
https://server.example.com/dolibarr/htdocs/cdav/server.php/calendars/<connected-user-login>/<calendar-user-id>-cal-<calendar-user-login>
https://server.example.com/dolibarr/htdocs/cdav/server.php/addressbooks/<connected-user-login>/default/
DAVx⁵ can detect automatically address book and all existing calendars (if an event exists) with generic DAV URL :
https://server.example.com/dolibarr/htdocs/cdav/server.php
You can use a tasks application to manage Dolibarr tasks (VTODO) on Android. DAVx⁵ is compatible with OpenTasks.
In CDav configuration, you can activate a QRCode display to autoconfigure DAVx⁵.
Be carefull, if you use https, DAVx⁵ needs a valid SSL certificate, excluding auto-signed certificates.
DAVx⁵ is also available on F-Droid.
iOS uses principals url to grab list of CalDAV or CardDAV resources :
https://server.example.com/dolibarr/htdocs/cdav/server.php/principals/<connected-user-login>
Admin users can also access Dolibarr documents through WebDAV with WebDAV URL :
https://server.example.com/dolibarr/htdocs/cdav/server.php/documents/
To test cdav module, you can use DAVx⁵ url https://server.example.com/dolibarr/htdocs/cdav/ in a web browser. Error messages are clearer.
Apache rewrite module is necessary if you use fcgi or php-fpm mode. In this case, .htacess file in cdav module has to be read by Apache or reported in your Apache configuration.
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
or
<IfModule mod_fastcgi.c>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
</IfModule>
or (this is usefull on Plesk when nginx is proxying Apache)
FcgidPassHeader AUTHORIZATION
It is recommanded to disable these Apache modules : dav / dav_fs / dav_lock
To solve authentication loop, add these directives to your nginx "location" rubrique :
fastcgi_param PHP_AUTH_USER $remote_user;
fastcgi_param PHP_AUTH_PW $http_authorization;
or
fastcgi_pass_header Authorization;
To solve authentication loop, add this directive to your nginx "location" rubrique :
proxy_pass_header Authorization;