| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 48 |
| Technical Name |
nexterp_account_allow_delete_last_invoice |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 48 |
| Technical Name |
nexterp_account_allow_delete_last_invoice |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
| Versions | 18.0 19.0 |
NextERP - Allow Delete Last Invoice
NextERP - Allow Delete Last Invoice
Overview
This module allows you to delete the last invoice from journal. A setting is available for each company in the Invocing Settings to allow/dissalow the behaviour.
Built & supported by NextERP Romania
Romanian Odoo specialists, here for the long run — from implementation to localization and day-to-day production support.
What we do
Odoo Solutions
From quick-start rollouts to multi-company deployments and custom modules built for your processes.
Romanian Localization
SAF-T (D406), e-Factura, e-Transport, D300 / D390 / D394, ANAF integration, full chart of accounts and fiscal positions.
Our Services
Implementation, customization, migration, integration, support and consultancy — Romanian-speaking, SLA-backed.
Features
- Delete the last posted invoice in a journal without breaking the accounting sequence lock.
- Per-company toggle — enable or disable the behaviour independently for each company via
account_allow_delete_last_invoiceonres.company. - Standard Settings UI — the option appears directly in Settings → Invoicing, requiring no developer mode or manual configuration.
- Minimal footprint — extends only
account.move.unlinkandres.config.settings; no new models or data files introduced. - Safe by default — the flag is
Falseon installation, so existing companies are unaffected until an administrator explicitly opts in.
Configuration
After installing the module, enable the feature per company:
- Go to Settings → Invoicing (or Settings → Accounting).
- Scroll to the Invoicing section and locate the Allow Delete Last Invoice checkbox (
account_allow_delete_last_invoice). - Tick the checkbox to allow deletion of the last invoice in a journal for the current company.
- Click Save.
Repeat for each company in a multi-company setup that should have this behaviour enabled. Companies where the checkbox is left unticked retain the standard Odoo protection against deleting posted journal entries.
To install this module, you need to:
- clone the branch 18.0 of the repository https://github.com/NextERP-Romania/odoo-community
- add the path to this repository in your configuration (addons-path)
- update the module list
- search for "NextERP - Allow Delete Last Invoice" in your addons
- install the module
How it works
Deleting the last invoice in a journal
Once the account_allow_delete_last_invoice setting is enabled for your company (see Configure), users with the appropriate access rights can delete the most recent posted invoice in a journal directly from the standard invoice list or form.
- Go to Invoicing → Customers → Invoices (or Vendor Bills for supplier invoices).
- Open the invoice you want to delete — it must be the last posted entry in its journal sequence.
- Reset the invoice to draft if required, then use the Action → Delete option (or the delete button in the list view).
- Odoo will allow the deletion instead of raising the usual sequence-lock error, because the
unlinkmethod onaccount.movehas been extended to respect the company-levelaccount_allow_delete_last_invoiceflag.
Note: Only the last invoice in the journal sequence can be deleted this way. Earlier entries remain protected to preserve accounting sequence integrity.
Versions
19.0.0.0.0 (2026-06-03)
- Changelog tracking starts at this release.
Discover the NextERP suite
Other modules from the same publisher, built to work together.
NextERP Romania
Odoo implementation, customization, Romanian localization and long-term support since 2018.
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