Unique Reference Enforcement
One reference, one document. Duplicates get blocked before they cause damage.
Duplicate vendor references lead to double payments. Duplicate customer references break reconciliation. Odoo warns about some of these but does not stop them. This module enforces uniqueness properly, with clear error messages for users and real database indexes underneath, so nothing gets through, not even imports or API calls.
What gets protected
| Document | Field enforced |
|---|---|
| Sale Order | Customer Reference |
| Purchase Order | Vendor Reference |
| Customer Invoice / Credit Note | Number |
| Vendor Bill / Refund | Reference |
| Payment | Memo |
Two layers of defence
Form-level checks give users a clear message the moment they save a duplicate. PostgreSQL unique indexes catch anything that bypasses the form.
Case and space proof
INV-001, inv-001 and " INV-001 " count as the same reference. No sneaky duplicates through formatting.
Per-company scope
Each company keeps its own reference space. Multi-company databases work exactly as you would expect.
Safe install and uninstall
Before installing, your database is scanned for existing duplicates so you can clean them first. Uninstalling removes the indexes cleanly.
See it in action
Duplicate vendor reference blocked on a purchase order
Duplicate customer reference blocked on a sale order
Support
Questions or a feature request? Email adedejitoriade@gmail.com. Built and maintained by Tajdigitals.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Purchase (purchase) • Discuss (mail) |
| Lines of code | 107 |
| Technical Name |
taj_unique_reference_enforcement |
| License | OPL-1 |
| Website | https://github.com/taj2307 |
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