This question has been flagged
4 Replies
6394 Views

Hi,

I just try migrate from local POS program to OpenERP 7.0. The product is successfully imported from CSV file. How can I put initial stock qty for my product? In which Warehouse location it should be put on?

Thanks + regards, Johan

Avatar
Discard
Best Answer

You could go in Warehouse > Inventory Control > Physical Inventories and create a new inventory. You'll have to add one line per product and specify the stock location.

Of course, once your inventory is created, you can chose to import it.

A v7 Runbot with all DB will give you an example of Starting Inventory at that place.

Avatar
Discard
Author

Thanks Antonie. Since I am newbie, please explain in detail how I can import the initial inventory data from CVS? BTW what is A v7 Runbot? Where is it? Thanks

Best Answer

I think you must make purchase to increase the qty of the product

Avatar
Discard
Author

I think you are right if I just begin the business with OpenERP. Actually I am migrate from other local made simple POS program, and the retail business is already running with about 800 active items with some stock of them. Any Idea?

Best Answer

From the product menu, select your product. There is a tab called 'Inventory' n the form view of product. There you can see a button link called 'Update' which is use to update the quantity available with you. If you have multiple locations then you need to add the group 'manage multiple locations' to the user.

Avatar
Discard
Best Answer

It can be scripted as well, depending on the amount of work it is for someone to manually add the numbers (and they might change after they have been added....). If you want to scipt it, you need:

a csv-file with the following things:

  • article (name/code/ what ever to uniquely identify it in the DB)
  • amount available
  • location (name/code what ever to uniquely identify location in the DB)

a script which does:

  • read file per line
  • look up the article, store the ID within the DB
  • look up the location, store the ID within the DB
  • in the table 'stock.change.product.qty', add the values: location ID, quantity
  • use the method change_product_qty to get the needed things changed

Code below is using the additional module openerp-client-lib. It is NOT a complete snippet, just something to get you started. If needed, I can give a more detailed answer later.

connection = openerplib.get_connection(hostname=h, database=db, login=u, password=p)

m = 'stock.change.product.qty'

model = connection.get_model(m)

v = {'prodlot_id': False, 'location_id': locID, 'new_quantity': from csv-file}

stockID = model.create(v)

context = {'active_id': id} # id of product!

res = model.change_product_qty([stockID], context)

Avatar
Discard
Author

Please give more detail.