Skip to Content
Menu
This question has been flagged
3 Replies
3468 Views

We'd like to subscribe to changes of customers and products without slamming the api for all changes on a periodic basis.  Automated action would have worked well, but we can't use python requests.  What do you recommend?

Avatar
Discard
Author Best Answer

Odoo allows you to send a message to an email based on change, but haven't added the ability to send that same message to a url on change.  Doesn't seem like it would take much to add that, but sounds like it's not on the roadmap.  So in the mean time we've created an email to listen for these changes and send the message to the url we were hoping odoo would.  Pretty much gets the job done, with a couple hoops to jump through.

Avatar
Discard
Best Answer

Can  you create your own model and use automated actions to update it? The model would then have full Python capabilities to do what you need to contact your other system.

Avatar
Discard
Best Answer

It may not be ideal, but it wouldn't be too difficult to implement a generic sub/pub model for something like this.


1. Create your own Event model for storing changes to other models in the system based on their type and primary id (plus any other extra information in case you want to get more detailed with changes).

2. Use automated actions on other models to push to your Event table.

3. Read out Events from the external system, and pull relevant changes.

Avatar
Discard
Related Posts Replies Views Activity
0
Sep 24
3
0
Sep 24
348
1
Jun 24
666
1
Mar 24
927
2
Mar 24
4356