Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hi I am using pgAdmin III to select the tables to be extracted out for SQL coding. However, I am unable to find the quantity on hand / quantity available in pgAdmin. Anyone knows where to get? Or is there a need to minus some values before deriving the quantity on hand? Many thanks
Product Quantity is functional field not store in Database.
You can get Product Quantity using query Code: Stock/Product.py
def get_product_available method if 'in' in what: # all moves from a location out of the set to a location in the set cr.execute( 'select sum(product_qty), product_id, product_uom '\ 'from stock_move '\ 'where location_id NOT IN %s '\ 'and location_dest_id IN %s '\ 'and product_id IN %s '\ 'and state IN %s ' + (date_str and 'and '+date_str+' ' or '') +' '\ + prodlot_clause + 'group by product_id,product_uom',tuple(where)) results = cr.fetchall() if 'out' in what: # all moves from a location in the set to a location out of the set cr.execute( 'select sum(product_qty), product_id, product_uom '\ 'from stock_move '\ 'where location_id IN %s '\ 'and location_dest_id NOT IN %s '\ 'and product_id IN %s '\ 'and state in %s ' + (date_str and 'and '+date_str+' ' or '') + ' '\ + prodlot_clause + 'group by product_id,product_uom',tuple(where)) results2 = cr.fetchall()
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 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/27/14, 10:10 PM|
|Seen: 1600 times|
|Last updated: 3/16/15, 8:10 AM|