Odoo Help


How openerp showing stock in particular location?

on 8/13/14, 9:11 AM 1,199 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.

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

on 8/13/14, 9:59 AM

About This Community

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


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