Prevent Over Receipt from Purchase Order
by Steven Marp https://apps.odoo.com/apps/modules/browse?author=Steven Marp$ 7.00
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) • Inventory (stock) |
| Lines of code | 48 |
| Technical Name |
sm_purchase_prevent_over_receipt |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Steven Marp |
| Versions | 18.0 19.0 |
Prevent Over Receipt from Purchase Order
Blocks Silent Over-Receipt
Validating a receipt linked to a purchase order checks each line against the quantity still remaining on that purchase order line, before stock and cost are updated.
Clear Error, Not a Silent Mistake
When a receipt would exceed the order, validation stops with a message showing the ordered, remaining, and attempted quantities - no guessing why it failed.
Per-Product Override
Tick "Allow Over Receipt" on a product to exempt it from the check, for products where receiving extra is expected or acceptable.
Only Touches Receipts
The check runs only on incoming receipts. Returns, deliveries, and internal transfers linked back to the same purchase order are never blocked by it.
Matches the Exact PO Line
The comparison uses the purchase order line linked to each stock move, not the product name - accurate even when the same product appears on multiple lines or orders.
No Configuration Screen
Works automatically on every receipt linked to a purchase order as soon as it's installed - nothing to set up beyond the optional per-product override.
See It In Action
A purchase order for 5 units, receiving 6 - blocked by default, allowed once the product is flagged, and never blocked on a return.
1. A normal purchase order, 5 units ordered
Purchase Order P00035 for "Test Cabinet Blocked", quantity 5, confirmed with vendor Azure Interior. Nothing different yet - the module works with any confirmed PO.
2. Receiving 6 instead of 5
On the generated receipt WH/IN/00023, the Demand is 5 but the Quantity is changed to 6 - one more than what was ordered - right before clicking Validate.
3. Validation stops with a clear reason
"Receiving 6.0 Units of Test Cabinet Blocked exceeds the remaining ordered quantity of 5.0 Units on P00035." The receipt stays in Ready, nothing is posted to stock or cost.
4. Correct quantity goes through normally
Quantity corrected back to 5, matching the 5 ordered. Validate now succeeds immediately and the receipt reaches Done - the module never gets in the way of a normal receipt.
5. Opting a product out of the check
On "Test Cabinet Allowed", the Purchase tab has a new "Allow Over Receipt" checkbox, ticked. Any product where extra receipts are normal can be exempted this way.
6. Same over-receipt, now allowed
Same scenario as step 2 and 3 - Demand 5, Quantity 6 - but this time on the flagged product. Validate goes straight to Done, no popup, because the override is on.
7. Returns are never blocked
Returning the 5 units received in step 4 creates delivery WH/OUT/00038, still linked back to the same purchase order. It validates to Done normally - the check only applies to incoming receipts, never to returns or deliveries.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) • Inventory (stock) |
| Lines of code | 48 |
| Technical Name |
sm_purchase_prevent_over_receipt |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Steven Marp |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module