Skip to content

Have you been hit with the "It is not possible to unreserve more products of ... than you have in stock." bug? Run this script to solve your issues. *** Test before ruining on a production environment

andycheng123/Odoo-Unable-to-Unreserve-Fix-Script

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Odoo Unreserve Fix

A quick and dirty script to deal with the "It is not possible to unreserve more products of ... than you have in stock." bug.

Test locally before running!!!

Set up

  • Insert your login info on line 35 -38
    url = "your ip"
    db = "your db"
    username = "youe email"
    password = "your password"
  • Insert products to check on line 57
    components = ['#product','#1product']

Logic

Basically something went wrong with QTY's or pickings and now Odoo will not let you close the record. Even attempting to delete from the API will not work. This should be used as a last resort, the script sets the QTY of the location to what is needed to close the move.

IE.

  • Record N has product N 3000 units UOM and is unable to close.

  • Location of the record N has a UOM LESS than 3000 units UOM reserved.

  • No matter what configs you make, the record will never close due to the QTY reserved being less than the move.

  • For example for Record N, product N 3000 units is reserved at location n, but the location N has a reserved QTY of 1000 units(regardless of UOM)

  • This script set the QTYS (both on hand and reserved) to 'product_qty' to get the move to be able to close.

  • Note: Keep track of the QTYs if you want to keep inventory in synch. I will add logic for this further down the road.

Usage/Examples

python3 unres_fix.py

Screenshots

Screenshot

About

Have you been hit with the "It is not possible to unreserve more products of ... than you have in stock." bug? Run this script to solve your issues. *** Test before ruining on a production environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%