Odoo Help


Ebay Inventory Importing in Odoo 9

David Todd
on 4/21/16, 5:14 PM 1,075 views

My use case is a little strange, but here's part of how we would like our inventory to work:

We have an ebay store and have written software to download our active items to import into the inventory. Initially we were looking to just do a simple CSV import, but found that we can't import quantity and this would've introduced problems with items that change. We added database access to our program to dump the active items directly into Odoo's database. This is working fine for the most part, except the On Hand Quantity does not always reflect what the database reports.

When importing initially, it is correct, but when we update the quantity (through the database, through odoo, through selling an item), it breaks and gives a seemingly random number in return.

The tables that we change when importing data are in this order:

  1. product_template

  2. product_product

  3. stock_inventory

  4. stock_quant

Is there just a table that we're forgetting to update, or is it something to do with how it calculates quantity? If it's the latter, where can I change that? We have no need for the system to calculate the quantity, just deduct when we sell.

Jeffrey Russell
On 5/11/16, 5:55 PM

Yes, look at the stock_move table  The quants are related to the moves which is where everything happens.  

Having similar issue with migrating from Open ERP 7 which did not have stock_quant we are having to create the stock_quants and relate them to the moves on import to Odoo 9.


Ray Carnes
On 5/11/16, 10:33 PM

Turn on SQL logging and watch which queries are run when you update the quantity on hand via the User Interface.  Then you can ensure the tables you update during import are the ones Odoo was programmed to work with and that your database is in a consistent state.

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

2 follower(s)


Asked: 4/21/16, 5:14 PM
Seen: 1075 times
Last updated: 5/17/16, 2:24 AM