Odoo Help

Welcome!

This community 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.

0

How openerp showing stock in particular location?

By
samba
on 8/13/14, 9:11 AM 774 views

When i observe code there was no specific table to store particular product QOH of  location(correct me if iam wrong). i.e product p1  has QOH 10 in loc1, p1 has QOH 20 in loc2, p2  has QOH 30 in loc2. Based on stock moves itself showing reports  products quantity location wise. What my problem is, when i want to update the product QOH, threre should be the moment in stock. I want to update product quantity on hand for particular location without stock move is it possible? Now  i am using  these lines to update product QOH in particular location. 

inventory_id = inventry_obj.create(cr , uid, {'name': _('INV: %s') % tools.ustr(res_original.name)}, context=context)

line_data ={
                            'inventory_id' : inventory_id,
                            'product_qty' : min_quantity,
                            'location_id' : id,
                            'product_id' : bundle,
                            'product_uom' : res_original.uom_id.id,
                            #'prod_lot_id' : data.prodlot_id.id
                        }
                        inventry_line_obj.create(cr , uid, line_data, context=context)

                        inventry_obj.action_confirm(cr, uid, [inventory_id], context=context)
                        inventry_obj.action_done(cr, uid, [inventory_id], context=context)

MOvement is ther in stock when i use these lines. But i want to update product QOH without moment. Please help me.

1
Quentin THEURET
On 8/13/14, 9:45 AM

samba, stock values are computed by doing the sum of incoming and outgoing stock moves in a particular location. You can see the method that do that in stock/product.py (see 'qty_available' field definition).

 

The way you use to put a specific value for a product in a location is the good way. I don't know other simplest way to do that.

Thank you, Quetin

samba
on 8/13/14, 9:59 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/13/14, 9:11 AM
Seen: 774 times
Last updated: 3/16/15, 8:10 AM