Hello,
I am trying to synchronize data from trello, with the Project Application in odoo. My problem is, if somebody modifies data on trello, I want odoo to be notified about it so the data in odoo can be upgraded accordingly.
So, as far as I understood about webhooks, I need to create a webhook on Trello, that will post HTTP request, each time the data are modified. And, in odoo, I need a consumer, that would receive the webhook posts and perform the necessary actions.
From what I understood, the webhook module (https://www.odoo.com/apps/modules/10.0/webhook/) is meant to provide the service able to receive those webhooks and execute some code, when it happens. Therefore, following the instructions in the module documentation, I built a trello webhook, as follows :
<?xml version="1.0" encoding="utf-8" ?> <odoo> <!--webhook trello data--> <record model="webhook" id="webhook_trello"> <field name="name">trello</field> <field name="python_code_get_event">request.httprequest.headers.get('Trello-Event')</field> </record> <!--webhook trello data of remote address--> <record model="webhook.address" id="webhook_address_trello"> <field name="name">IP address of the server my odoo instance is running on</field> <field name="webhook_id" ref="webhook_trello"/> </record> </odoo>
Now, my concern is : to create a webhook in trello, I need to specify a call-back URL, meaning the URL Trello should post the webhooks to. I guess, I need to provide trello a URL pointing on my odoo server.
Knowing that I have a domain name, let’s call it : myodoo.org, from which I can access my odoo web interface from a web browser. Given the webhook consumer definition I gave above, am I using the webhook module correctly ?
What would be the call-back URL I should give Trello, so it can hit the webhook consumer I defined ?
Is there a way to find it out ? Or to set it up ?
Thank you very much for your time and concern.
Cyrille -- LaLibrerie : lalibrerie-solidaire.org
Hi LaLibreRie -- Am also looking for similar kind of Solution, Did you find out how to achieve this, please advise. Thanks aton in advance.
Yes, the url is defined in the controllers/main.py file of the webhooks. Their is a @route decorator, which first parameter is the relative url from root url of your odoo instance.