Taking thousands of products from a legacy system & importing them neatly into Odoo
How hard can it be?
This is a very raw account of the process and hurdles experienced, (and overcome) whilst importing a few thousand products from a legacy sytem into Odoo version 8.
It goes through the learning curve experienced in becoming more familier with Odoo, and looking at its history of being called TinyERP, and OpenERP. Additionally, we peek into working with Postgres to interface with Odoos database where helpful.
The story end with the 0.1 release of a Mamut export script (the legacy system from which the data is exported) which automates much of the process of exporting product data from Mamut. The code can be reused, and would need to be refactored heavliy for it to become a generic migration script.
What is this Odoo thing anyway?
Worth Watching
What are we trying to achieve?
- Product name
- Description
- SKU
- Price buy
- Price sell
- Product category for
- POS module
- Warehouse module
- Ecommerce module
Getting the data out: XML & TSQL export.
Getting the data in (part 1)
Double Entry Stock Stock Keeping
Its important to understand that Odoo uses double entry stock keeping. Much in the same way that accountancy packages do doule entry bookeeping(every entry into an account requires a corresponding exit). This can be confusing at first, as it required you to import new products from 'Virtual locations' in order for Odoo to do complete journaling of stock. Odoo then "calculates stocks for all of the physical locations" (docs).
Virtual stock locations also come into play when orders are being processes. For example, it is possible that your virual stock level is less then your physical inventory when you have orders that have not yet been shipped. This is useful for a buying manager to decide whether to replenish stock, for example. In the same light, should you have a shipment scheduled to deliver more product to the warehouse, it is possible for your Virtual inventory to be higher than your physical inventory. Virtual inventory stock levels esesstial equiate to answering the question "What puantity of product could potentially sell right now with current stock levels, including scheduled shipments minus items already sold?".
Note: Mass Editing Module does not work for quanity on hand for initial import.
References & Useful links
Recording Anual Inventory
- More in depth explaination of Virtual Locations: https://doc.odoo.com/6.1/book/5/5_14_Stock/5_14_Stock_inv/#location (Note this pertains to version 6, the priciple remains)
- Step by step with spreadsheet example: http://stackoverflow.com/questions/26104971/importing-qoh-in-odoo-8
- Guy who had sucess changing product_product to product_template https://www.odoo.com/forum/help-1/question/importing-csv-inventory-in-odoo-8-64344
- http://stackoverflow.com/questions/29671399/how-to-import-qoh-in-odoo-8