FreePBX contact manager sync.
- Sync contacts from Odoo to FreePBX.
- Update your FreePBX contacts regulary from Odoo.
- Easy installation.
- Automatic initialization of configuration.
- Install Odoo module freepbx_contacts. Restart Odoo.
Login into your FreePBX server. Go the folder where you want to put the odoo_sync.py script. For example, /opt/odoo_sync. Below you can find the installation session:
mkdir /opt/odoo_sync cd /opt/odoo_sync # Install dependencies pip install mysql-connector-python # Download odoo script and make it executable. Replace your.odoo.server to your data. curl -v http://your.odoo.server/freepbx_contacts/static/files/odoo_sync.py > odoo_sync.py chmod +x odoo_sync.py # Initialize and download config file. curl -v http://your.odoo.server/freepbx_contacts/init_cfg > odoo_sync.cfg # Edit odoo_sync.cfg and adjust your local settings if required. # Run the script to test it. No output means all is fine. python ./odoo_sync.pyDecide how often you want to sync your partners to FreePBX and create a cron job for this. For example this will call sync script every hour:
echo '0 * * * * (cd /opt/odoo_sync && /opt/odoo_sync/odoo_sync.py)' | crontab -u root -Warning! This will overwrite your root crontab. If you have existing crontab edit it manually with
If you are not able to serve a single db using database of dbfilter then you need to create odoo_sync.cfg manually. Here is an example:
[odoo] db=odoopbx_13 url=http://demo.odoopbx.com token=99f649d0909c454a920c5aaec8c4373a [mysql] host=localhost user=root passwd= db=asterisk
Do not forget to add freepbx.token System Parameter (see below).
How to reset authentication token?
The auth token is stored in Technical -> System Parameters under freepbx.token param. You can change it there and also update your odoo_sync.cfg file on your FreePBX server.
My odoo_sync.cfg file contains 403 Forbidden Already initialized!
This is because you already used init procedure. In order to generate a config file remove freepbx.token param from Technical -> System Parameters and call init_cfg URL again (see the Installation section above).
If you get:
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version!then upgrade requests library:
pip install --upgrade requests
For support and communication please visit OdooPBX.com forum and ask questions there.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module
- The author can leave a single reply to each comment.
- This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
- If you want to start a discussion with the author or have a question related to your purchase, please use the support page.