Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
7 ตอบกลับ
7812 มุมมอง

We were doing some testing on odoo 8,  today we decided to update all the products to the actual product quantity.  

Sales> Products> Choose product >Inventory > Click update at "Quantity On Hand" and update the number.

However due to the previous testing the Quantity Available is not equal to quantity on hand. Is there a way to clean up the mess but still keep the quantity on hand? please help.

อวตาร
ละทิ้ง

if u update via odoo UI it will automatically update both quantity on hand and quantity available to same number..

ผู้เขียน

Not really if I have pending incoming or out going qty, I just need to remove those via sql but must not affect the quantity on hand?

ผู้เขียน

instead of cancellation one by one, is there a way to remove them in bulk?

คำตอบที่ดีที่สุด

Hello JC,

For that you should cancel all the stock moves which are not done (which are in between progress states) of related products.

Either you can cancel them manually or can run following sql query from postgres.

delete from stock_move where state not in ('draft', 'cancel')

อวตาร
ละทิ้ง

Sql delete query will work but its not a good option, but you can use it if you want to.

คำตอบที่ดีที่สุด

Thanks a lot for this info. Solved my problem.


regards

Jan

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Probably you have active Procurements or Stock Moves. If you cancel all (first procurements), Quantity Available should be equal to Quantity on hand.

อวตาร
ละทิ้ง