Help

2

How to update weight in quant in odoo 10.0 ?

Avatar
Jignesh Mehta

Hello,


I have created 1 custom field that is OnHand Wt in product same functionality like OnHand Qty.

Now, Add 1 more custom field in Purchase order line which is Weight. When I created Purchase order, confirm it and received it, OnHand for qty and Weight is updated.

For Ex:-

I have 1 Product that is Product A. Now I Purchase Product A with 10 qty and 100 weight. Now I confirm it and received it. So when I see in Product A's Form, Onhand will show 10 and Onhand wt(Custom field) show me 100 which is correct.


Now, Add 1 more custom field in Sales order line which is Weight. When I created sale order, confirm it and deliver it, OnHand for qty is updated but Weight is not updated.

For Ex:-

When I sale Product A with 3 qty and 30 weight, Product Onhand show me 7(Correct) but weight show me 100(Incorrect, It will show me 70).


When I create SO and confirm it, there is create quant for that. I updated new quant with qty and weight but Old quant weight is not updated.

So I want to update Old quant from where new quant generated. So how can i update it ?


Any suggestion will be Appreciated.

Thanks,

3 Comments
Avatar
Discard
Avatar
Ricardo Gross
-

I also continue having a problem with sum of product weights in odoo 11: https://www.odoo.com/forum/help-1/question/manufacturing-and-delivery-weights-131680

Avatar
Ibrahim Boudmir
-

Hi,

can you paste here both functions for OnHand Wt and OnHand Qty ?

Thanks.

Avatar
Jignesh Mehta
-

Hello,

I have added wt field in stock.move and stock.quant

Onhand wt function is copy from Onhand qty, just calculate the wt field which is in move and quant.

I have a issue in quant, while sale created 1 quant is create from the existing quant. I want to update existing quant.

You can see it in product.product form field name is stock_move_ids and stock_quant_ids.

If you have doubt, please ask me.

Thanks.