5

I want to update my stock in odoo either its by odoo frontend or using backend (postgres query).

I have my stock value in csv file.

Finally, I want to update quantity on hand in bulk.

orde
  • 5,233
  • 6
  • 31
  • 33

3 Answers3

5

It's finally solved, simply follow the step

Step – 1 ;

1-> select product in warehouse module (open in list view).

2-> select the product which you want to update the inventory .

3-> click on more button and export column

i-> product name and any other one if you needed .

you have file with name of product.temlate.csv .

4-> Add a column qty and enter the quantity of product .

Step – 2;

1-> select inventory adjustment in warehouse module .

2-> if you already have any created inventory then go to 3rd point if not then create a inventory and feel the detail . and select all product option in Inventory of - :

3-> now again click on inventory adjustment and select the inventory.

4-> click on more and export the following column

Inventories/location

Inventories/product

Invevtories/product Unit of Measure .

Now you have one more file with name stock.inventory.csv

Step -3 ->

1-> now add two column on stock.inventory.csv

First one is name and second is line_ids/product_qty.

and remove the id column .

2-> delete the value of column line_ids/product_id/id of stock.inventory.csv file .

now copy the values of id column from product.template.csv and paste into the line_ids/product_id/id column of stock.inventory.csv .

3-> now copy the values of qty column from product.template.csv and paste into the line_ids/product_qty column of stock.inventory.csv .

4-> enter any value in name column for your reference .

Step – 4-

make sure your file look like this file:-

Click on following link to see file

This is a sample of the succesfully imported data

http://bit.ly/odoocsv

AFTER IMPORTING DONT FORGET START INVENTORY

Community
  • 1
  • 1
  • if any one needed any help then comment here –  Jun 19 '15 at 18:55
  • 1
    Hi, have you came across this error? I'm not sure the order of your steps are correct, I can only get the product_id constraint to pass if I manually add a quantity on hand for each project (which takes a long time of course!) "insert or update on table "stock_inventory_line" violates foreign key constraint "stock_inventory_line_product_id_fkey" DETAIL: Key (product_id)=(20524) is not present in table "product_product". at row 2" Any ideas? Many thanks – user885983 Aug 11 '15 at 10:26
  • I have done this process for a month . It is correct . first please tell me either you want to enter the quantity from Odoo or directly into database . –  Aug 14 '15 at 05:19
  • What do you mean by "AFTER IMPORTING DONT FORGET START INVENTORY" – ndemoreau Sep 24 '15 at 06:02
  • there is an option of start inventory . for using your inventory you have to start this inventory and delete previous one if u don't needed –  Sep 24 '15 at 06:15
  • I could not get this to work for me under Odoo 10.0. I get the same "insert or update on table "stock_inventory_line" violates foreign key constraint "stock_inventory_line_product_id_fkey" as the other user mentioned. Furthermore, the plugin mentioned below fails to install for me as well on Odoo 10.0. – Rohn Adams Mar 09 '17 at 20:36
0

You can fill up stock by using physical inventory, it's available at

Warehouse -> inventory Control -> Inventory Adjustment

You can import your csv in odoo and fill up physical inventory.

stock.inventory
stock.inventory.line

These are the models that you have to used to update your stocks(Inventory Loss to Stock Location).

0

Another easy option to update any odoo fields via frontend in bulk is to install MassEdit addon from: https://github.com/OCA/server-tools/tree/8.0/mass_editing

tested on odoo v8 and works great

Mike
  • 76
  • 1
  • 8