Odoo Help


How poll for stock changes

Alvin Kwekel
on 4/6/16, 11:23 AM 668 views

I want to update an external system with every stock change (resupply, sales, returns) in Odoo.

Currently I use a Java API that wraps the Odoo XML-RPC interface. Using this I periodically call the search method on stock.move to get any changes in stock. I keep track of the 'stock move'-ID since last call to know what updates I already handled (ID > highest ID from previous poll). Using the product ID's from the results I then call the read method on product.product to get the product's absolute current stock value and its internal reference code. Updates to the external system are done product by product based on the internal reference code.

The solution works but since I'm not an experienced Odoo developer (or even user) I'd like to hear any feedback on my current approach or suggestions for a better one.

The solution:

  • has to be based on, or work with, Java technology to fit in with the current architecture;

  • should be as real time as possible;

  • needs to be robust and capture all possible types of stock updates;

  • has to output the absolute stock value and not the delta to the stock;

Any feedback is much appreciated.

Kind regards,


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/6/16, 11:23 AM
Seen: 668 times
Last updated: 4/6/16, 11:32 AM