i created my own module , which will add one2many field to product.product ,this one2many will have 'size' column .
now i created other one2many field in stock.move which has the same column 'size' , i want to subtract the stock.move.size with product.product.size (stock.move.size - product.product.size)
so from the stock.move form how can i update the value of 'size' which is on the product.product
Any help will be appreciated .
You have a couple of options. One is to create a button that call a method to update the product.product's size field based on the current stock.move's data, or you can do it on the stock.move's write.
One quetion that pops into my head is, you'll be creating tens, hundreds, or thousands if not more, stock.move for that particular product, aren't you going to just make it very large negative number? I have a hunch you mean to do something else, maybe if you can state what you intend to do, a better help can be offered.
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
|Asked: 11/20/14, 1:16 AM|
|Seen: 391 times|
|Last updated: 3/16/15, 8:10 AM|