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

update the product onhand quantity

By
MoayadRayyan
on 11/23/14, 5:50 AM 732 views

Greetings,

I'm trying to modify onhand quantity from product.template view , i added fields which the summation of them should be stored on the onhand quantity avilable field , it should be automated so every thing is fine with me but i can't update the avilable quantity which is on the ' stock_change_product_qty ' view .

 

so how i can do it .

 

Thanks

0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 11/24/14, 4:43 AM

Moayad, On Hand Available quantity is a calculated field.  To change the quantity on hand, you need to create stock.move.  Inventory Stock model is a way to allow you to create a stock.move that makes the quantity to be the figure you specify.  The stock_change_product_qty is the wizard that you can use to create Inventory Stock (see the method change_product_qty of that model) for a particular product.

So, if you have a couple of fields added to specify the quantity on hand in the product.product model, one way you can actually change the quantity on hand is by triggering stock_change_product_qty (update link) and set the new_quantity field of that model to be the figure that you want.  To do so, you can explore the default_get method of ORM.

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: 11/23/14, 5:50 AM
Seen: 732 times
Last updated: 3/16/15, 8:10 AM