Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Accounting
  3. Stock Return Validation for Refunds v 19.0
  4. Sales Conditions FAQ

Stock Return Validation for Refunds

by Grevlin Global Corp https://grevlin.com
Odoo

$ 47.45

v 19.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Purchase (purchase)
• Invoicing (account)
• Discuss (mail)
• Inventory (stock)
Lines of code 115
Technical Name grev_od_stock_refund
LicenseOPL-1
Websitehttps://grevlin.com
Versions 17.0 18.0 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Purchase (purchase)
• Invoicing (account)
• Discuss (mail)
• Inventory (stock)
Lines of code 115
Technical Name grev_od_stock_refund
LicenseOPL-1
Websitehttps://grevlin.com
Versions 17.0 18.0 19.0
  • Description
  • Documentation
  • License
📦

Stock Return Validation for Refunds

Ensure goods are physically returned before issuing credit notes — prevent accounting and inventory mismatches automatically.

✓ Odoo Community and Enterprise ✓ Customer & Vendor Refunds ✓ Sales & Purchase Orders

By default, Odoo lets you create credit notes even when the related goods have never been returned. This leads to inventory discrepancies and financial risk. Stock Return Validation for Refunds closes this gap by enforcing two automatic checks — so your books and warehouse always stay in sync.

Two Layers of Protection

🚫

Check 1: Return Existence

When creating a credit note, the module checks whether the original invoice's deliveries (or receipts) have at least one stock return. If no return exists, the refund is blocked entirely — preventing premature credit notes.

⚠

Check 2: Quantity Validation

When posting a credit note, each line's refund quantity is compared against the actually returned stock quantity. If the refund exceeds the return, a warning is raised with per-line details — prompting the user to regulate stock first.

How It Works

1

Deliver Goods

Confirm your sale or purchase order and complete the delivery or receipt as usual.

2

Process Return

Create a stock return for the delivered goods. Without this step, the refund will be blocked.

3

Issue Credit Note

Create and post the credit note. The module validates quantities and lets you proceed with confidence.

Built for Your Workflow

✓   Customer credit notes (sales refunds)

✓   Vendor debit notes (purchase refunds)

✓   Sale & purchase order integration

✓   Per-line quantity validation

✓   Company-level setting to bypass when needed

✓   Standalone invoices unaffected

Changelog

Version 19.0.1.0.0 — February 2026

  • Initial release
  • Block refund creation when no stock returns exist for related deliveries or receipts
  • Per-line quantity validation comparing refund amounts against returned stock
  • Support for both customer credit notes and vendor debit notes
  • Company-level bypass setting in Accounting configuration
  • Standalone invoices (not linked to SO/PO) are unaffected

Need Help?

For support, contact us at odoo@grevlin.com

Follow us on X: @GrevlinGlobal

⭐ 30 days free support ⭐

Stock Return Validation for Refunds

Require stock returns before allowing invoice refunds, preventing accounting and stock mismatches.

Overview

When creating credit notes (refunds), Odoo allows them regardless of whether the related goods have been physically returned. This creates a risk of accounting discrepancies where refunds are issued for goods that remain with the customer or are still in the company's warehouse.

Stock Return Validation for Refunds adds two layers of validation:

  1. Hard block -- prevents refund creation if the invoice's related deliveries or receipts have no stock returns at all.
  2. Quantity warning -- warns if the refunded quantity exceeds the returned stock quantity per line, with a company-level bypass setting.

The module works with both customer refunds (out_refund) and vendor refunds (in_refund), for invoices linked to sale or purchase orders. Standalone invoices are not affected.

Configuration

Bypass Setting

To allow credit notes to be posted even when refund quantities exceed returned stock:

  1. Go to :menuselection:`Accounting --> Configuration --> Settings`.
  2. Under the :guilabel:`Credit Notes` section, enable :guilabel:`Allow Refunds Without Full Stock Return`.
  3. Click :guilabel:`Save`.

Note

This setting only bypasses the quantity check at posting time (Check 2). The hard block when creating reversals (Check 1) always applies regardless of this setting.

Usage

Check 1: Reversal Wizard Block

When an accountant attempts to create a credit note via the :guilabel:`Reverse` button on a posted invoice:

  1. The module checks if any completed delivery (for sales) or receipt (for purchases) linked to the invoice has a stock return.
  2. If no returns exist at all, a :guilabel:`UserError` is raised and the refund is blocked.
  3. The accountant must process a stock return before trying again.

Tip

This check applies to both customer invoices and vendor bills. If the invoice has no linked sale or purchase order (standalone invoice), the check is skipped.

Check 2: Quantity Warning at Posting

When posting a credit note (out_refund or in_refund):

  1. The module compares each product line's refund quantity against the total returned stock quantity.
  2. If any line has a refund quantity exceeding the returned quantity, a :guilabel:`UserError` is raised listing the mismatched lines.
  3. The accountant can either:
    • Process additional stock returns to match the quantities.
    • Enable the bypass setting in :menuselection:`Accounting --> Configuration --> Settings`.

Technical Details

Models Inherited

Model Type Purpose
account.move Persistent Quantity check at posting (action_post)
account.move.reversal Transient (wizard) Return existence check (reverse_moves)
res.company Persistent Stores the bypass setting
res.config.settings Transient Exposes the bypass setting in Accounting settings

Fields Added

Field Model Type Description
force_refund_without_return res.company Boolean Allow posting refunds without full stock returns
force_refund_without_return res.config.settings Boolean (related) Settings UI field linked to the company field

Key Methods

_check_stock_returns()
On account.move.reversal. Verifies that at least one stock return exists for the deliveries or receipts linked to the invoice being reversed. Called before reverse_moves().
_check_refund_return_quantities()
On account.move. Compares each credit note line's quantity against returned stock quantities. Called before action_post(). Skipped when force_refund_without_return is enabled on the company.
_get_order_line_and_picking_code(line)
On account.move. Helper that returns the linked order lines and picking type code for a credit note line.

Dependencies

Module Purpose
sale_stock Links sale orders to stock pickings
purchase_stock Links purchase orders to stock pickings
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

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with