How to do an Odoo inventory import

In Odoo, inventories are managed through Inventory / Inventory Control / Inventory Adjustments. Importing your stock, means creating an inventory adjustment. You will import your first stock (initial inventory), using exactly the same procedure as later stock’s imports.

Minimal prerequisites

  • At least one warehouse created (should be done automaticaly)
  • Products and variants already imported

First obvious option is to create a new Inventory Adjustment, checking the « All products » option. Then press Start Inventory button : products will be populated. You can modify stock inline in Real Quantity column. But with lots of products, you will prefer to do that in a spreadsheet :

  1. keep your first Inventory Adjustment in draft mode,
  2. go back to Inventory Adjustments, select your inventory, export it (select the required fields as the below list),
  3. update your spreadsheet and import it back.

Required fields to export / import

  • Company (company id) : company_id/id, usually « base.main_company »
    (this field should have only one record)
  • Inventoried Location (warehouse) : location_id/id, with only one warehouse it will be « stock.stock_location_stock »
    (this field should have only one record)
  • Inventory Reference (inventory name) : name, whatever
    (this field should have only one record)
  • Inventories / Product (product external id) : line_ids/product_id/id
  • Inventories / Product Name : line_ids/product_name
  • Inventories /Checked Quantity (product stock) : line_ids/product_qty

You will get also (automaticaly added) :

  • Stock inventory id (external id) : id
  • Inventories : line_ids/location_id/id

Step by step how-to import products stock in Odoo

Open a spreadsheet, populate it with your product names, product external id and product quantity — much easier to export them from Odoo ; export from product’s variants if you use them.

Rename your columns as follow :

  • Product name : line_ids/product_name
  • Product external id : line_ids/product_id/id
  • Product quantity : line_ids/product_qty

Add following columns (corresponding to field’s name) at the end. The order doesn’t matter :

  • company_id/id
    (this column will contain one record on the first line only, usually « base.main_company »)
  • location_id/id
    (this column will contain one record on the first line only, usually « stock.stock_location_stock »)
  • name
    (this column will contain one record on the first line only, put whatever you want)
  • line_ids/location_id/id
    (every line will contain the same value as the first line of location_id/id)

Save it as a CSV file. Open Odoo Inventory menu, go to Inventory Adjustment and press the Import button.

Once imported, a new entry will be created in Draft status. Open the entry and press Start Inventory. Validate the inventory if everything is ok.