Module Google: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (Updating interlang links (links to translated versions of this page in other languages) triggered by origin English page "Module_Google" update.)
mNo edit summary
Tag: 2017 source edit
Line 46: Line 46:
= Setup =
= Setup =
{{ActivationModuleEn}}
{{ActivationModuleEn}}
== Setup of Google Contact ==
This module allows you to synchronize Dolibarr with your Google contact annuary. Synchronisation of contacts can be done toward only one Google account. However, using the Google sharing features (delegate contacts), everybody could see them.
1) You must first enable the API for your Google account. For this go on page {{ModuleGoogleUrlToCreateApiAccount}}, menu "API & Authentication" -> "Enable API". Click to enable API for "Contact API".
2) Then go on the setup page of Google module in Dolibarr, choose all Dolibarr elements you want to synchronize among (You can choose several choices):
* Thirdparties (if module Thirdparty is enabled)
* Contacts/addresses of thirdparties (if module Thirdparty is enabed)
* Members (if module foundation members is enabled)
For each type of synchronization activated, enter a label of the Google Group of your choice. This is the group visible into Google to group all records together. Group will be created into Google Contact if not exists. You can also use a label of one of any predefined Google system group like: '''"System Group: My Contacts", "System Group: Friend", "System Group: CoWorker", "System Group: Family"'''
Note also that only the predefined system group '''"System Group: My Contacts"''' is shared by the "Delegate contacts" Google feature of Google contact (Google Apps for Work). So if you want to share your Google contact annuary, that contains Dolibarr records, to have other users seeing it, you must put your Dolibarr records into this group. They can't be put into another group if you plan such a share (only one account can be used).
Then enter the following information:
# The Google login account (example myaccount@gmail.com or myname@mycompany.com)
# The Google Client ID and the Google Client Secret. You can create your Google Client ID and Secret from page {{ModuleGoogleUrlToCreateApiAccount}}, menu "API & Authentication" -> "Credentials". Click on "Create a client ID" and choose "Web Application", set "Allowed Javascript origin" to empty and set "Redirect URI" to the value provided into the "Note" on the setup page. It should be something like http://mycompanydomain/.../google/oauth2callback.php
# Then click on button "Create". You will get a new '''Client ID''' and a '''Secret code'''. Save the Google setup page after filling Client ID and Secret Code.
# A warning should say you don't have yet any Google token saved into your Dolibarr database. Click on the link to authenticate, enter your Google credential if requested (same account than the account entered at step 2 and accept any confirmation. You should go back on the Dolibarr setup page, but a value for the token, saved into your Dolibarr database should appears.
Buttons to make synchronization tests should be available. Click on them to make tests.
'''TroubleShooting'''
* [[File:Warning.png]] Note: A possible error is that Google denies access, even if your setup is correct, just because the server that host Dolibarr is located into another country than country uou are using google apps usually.
To check Google has locked your access for this reason, go onto page https://security.google.com/settings/security/activity?hl=fr after failure.
If it appears Google has blocked access attempts from an unusual location, accept this attempt. Then, you must wait 24 hours to try again.
* [[File: Warning.png]] Note: Another possible error is that Google denies access even if your setup is correct, because you turned on Google option 2-step validation. To check if you have actually enabled this option, go to the page: {{GoogleURLToSetup2StepValidation}}
If in the "Validation in two stages," you have "On", the problem is found. You do not have to disable it. You can solve the problem as follows:
Click "Edit" next to the title of the "Validation in two steps."
Click the link "Manage passwords specific to applications". Enter a name, for example "Google Access for Dolibarr" and confirm. A password will be provided.
Return to the configuration page of Google Dolibarr module and enter this password in the configuration page of the module, instead of your regular password, then click '''Save'''.
Retry the test synchronization.
* [[File: Warning.png]] Note: Another possible error is that Google denies access even if your setup is correct, because the server Dolibarr runs on or your local computer is not on time. Check that date and hour of your computer and server are correct.


== Setup of Google Calendar/agenda features ==
== Setup of Google Calendar/agenda features ==
Line 136: Line 179:
* [[File: Warning.png]] Note: Another possible error is that Google denies access even if your setup is correct, because the server Dolibarr runs on or your local computer is not on time. Check that date and hour of your computer and server are correct.
* [[File: Warning.png]] Note: Another possible error is that Google denies access even if your setup is correct, because the server Dolibarr runs on or your local computer is not on time. Check that date and hour of your computer and server are correct.


== Setup of Google Contact ==
This module allows you to synchronize Dolibarr with your Google contact annuary. Synchronisation of contacts can be done toward only one Google account. However, using the Google sharing features (delegate contacts), everybody could see them.
1) You must first enable the API for your Google account. For this go on page {{ModuleGoogleUrlToCreateApiAccount}}, menu "API & Authentication" -> "Enable API". Click to enable API for "Contact API".
2) Then go on the setup page of Google module in Dolibarr, choose all Dolibarr elements you want to synchronize among (You can choose several choices):
* Thirdparties (if module Thirdparty is enabled)
* Contacts/addresses of thirdparties (if module Thirdparty is enabed)
* Members (if module foundation members is enabled)
For each type of synchronization activated, enter a label of the Google Group of your choice. This is the group visible into Google to group all records together. Group will be created into Google Contact if not exists. You can also use a label of one of any predefined Google system group like: '''"System Group: My Contacts", "System Group: Friend", "System Group: CoWorker", "System Group: Family"'''
Note also that only the predefined system group '''"System Group: My Contacts"''' is shared by the "Delegate contacts" Google feature of Google contact (Google Apps for Work). So if you want to share your Google contact annuary, that contains Dolibarr records, to have other users seeing it, you must put your Dolibarr records into this group. They can't be put into another group if you plan such a share (only one account can be used).
Then enter the following information:
# The Google login account (example myaccount@gmail.com or myname@mycompany.com)
# The Google Client ID and the Google Client Secret. You can create your Google Client ID and Secret from page {{ModuleGoogleUrlToCreateApiAccount}}, menu "API & Authentication" -> "Credentials". Click on "Create a client ID" and choose "Web Application", set "Allowed Javascript origin" to empty and set "Redirect URI" to the value provided into the "Note" on the setup page. It should be something like http://mycompanydomain/.../google/oauth2callback.php
# Then click on button "Create". You will get a new '''Client ID''' and a '''Secret code'''. Save the Google setup page after filling Client ID and Secret Code.
# A warning should say you don't have yet any Google token saved into your Dolibarr database. Click on the link to authenticate, enter your Google credential if requested (same account than the account entered at step 2 and accept any confirmation. You should go back on the Dolibarr setup page, but a value for the token, saved into your Dolibarr database should appears.
Buttons to make synchronization tests should be available. Click on them to make tests.
'''TroubleShooting'''
* [[File:Warning.png]] Note: A possible error is that Google denies access, even if your setup is correct, just because the server that host Dolibarr is located into another country than country uou are using google apps usually.
To check Google has locked your access for this reason, go onto page https://security.google.com/settings/security/activity?hl=fr after failure.
If it appears Google has blocked access attempts from an unusual location, accept this attempt. Then, you must wait 24 hours to try again.
* [[File: Warning.png]] Note: Another possible error is that Google denies access even if your setup is correct, because you turned on Google option 2-step validation. To check if you have actually enabled this option, go to the page: {{GoogleURLToSetup2StepValidation}}
If in the "Validation in two stages," you have "On", the problem is found. You do not have to disable it. You can solve the problem as follows:
Click "Edit" next to the title of the "Validation in two steps."
Click the link "Manage passwords specific to applications". Enter a name, for example "Google Access for Dolibarr" and confirm. A password will be provided.
Return to the configuration page of Google Dolibarr module and enter this password in the configuration page of the module, instead of your regular password, then click '''Save'''.
Retry the test synchronization.
* [[File: Warning.png]] Note: Another possible error is that Google denies access even if your setup is correct, because the server Dolibarr runs on or your local computer is not on time. Check that date and hour of your computer and server are correct.


== Setup of GMaps features ==
== Setup of GMaps features ==

Navigation menu