Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

ODOO 14 Community: how can I delete an invoice?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
5 Respostes
11313 Vistes
Avatar
Joan

Hello, 


INTRODUCTION

You can jump directly to the question if you want...

We are evaluating Odoo 14 as our accounting program as we have an old system that works, but needs a complex architecture (One data server (linux), one license server (windows) and then n client computers).  This old system starts to fail and we are willing to migrate to a newer thing.

I'm a programmer, not an accountant, but I'm in charge of validating the options we are thinking about.

Then, we are thinking on a dockerized Odoo system inside a NAS, which could be accessed from everywhere using a simple web navigator.


THE QUESTION ITSELF:

Our accountant department manager is telling me she can't delete invoices.

Of course this is not a normal practice, but in case of making a mistake she would like to be able to do it.

She is aware she can set the invoice to draft again and then update it, but in case it's the last invoice before closing the year (or any other accounting milestone), she would like to remove it from the system, of course, before being paid...

This should be able to be done in both invoices to customers and from vendors.


How can this be done?


As an example (now I have only 3 invoices in the demo system) 2 in vendors and one in customers.

I have both vendor invoices cancelled and not paid, but even that, I can't remove those invoices from the system.

In the invoice I have in the customers section, it sports a draft status and it's neither paid, but can't be deleted.


In all cases the message that appears is:



User Error

You cannot delete an entry which has been posted once.



Notice I'm trying to do this from the administrator account, so it must not be a privileges issue.


Thank you very much in advance.
1
Avatar
Descartar
Joan
Autor

It works, thanks you very much!


I guess then we should go through the journal items and do the same with the elements that are related to that invoice...


Is that right?  can this be automated?


Thank you very much again.

Sandhya Elizabeth

Hello, i tried doing this but I am unable to delete.

Odoo Mates

See: https://www.youtube.com/watch?v=Avo42KGbkKA

Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Best Answer

Once the invoice is validated/posted, it cannot be deleted. But there is still an option to delete the invoice forcefully.

Follow the following steps:

1) Enable developer mode and click on Edit Action:


2) Add 'force_delete': True in the Context Value field which will allow you to delete the invoice:



8
Avatar
Descartar
Chris TRINGHAM

This seems rather dangerous, as it would allow any invoice to be deleted, overriding the validation in Odoo.

Sudhir Arya (ERP Harbor Consulting Services)

This is just a temporary option to delete the invoice. Of course, it is dangerous if the user deletes the wrong invoice by mistake. So the user will have to be careful before deleting the invoice.

Chris TRINGHAM

In which case it might be better to create a new menu option for Force Delete with only the Administrator authorized to use it.

Avatar
Thoutmos Sanebankh
Best Answer

As    Sudhir Arya  said :

  but  better  to  put True  in  quote:    'force_delete': 'True' 

my old context value:

{'default_move_type': 'out_invoice'  }

my new context value:

{'default_move_type': 'out_invoice' ,  'force_delete': 'True'}

This  worked for  me.


1
Avatar
Descartar
Avatar
Carlo Dischler
Best Answer

I also changed the context value and seems like i had an typo in it.

Now i'm not able to open the accounting module any more. Where can i change this context entry from technical settings menu? Or how can i access the "Edit action" window when not able to open the needed page?

0
Avatar
Descartar
Josep Anton Belchi Riera

You can use the menu (in debug mode) Settings / Technical / Actions / Actions

Carlo Dischler

I can find the action there but I can't find a way how to edit the Context field there. Any idea?

Avatar
SOMEONE
Best Answer

Hello! I did this , and cannot acces invoice view . 

ERROR:

Traceback:
Error: Expected "}", got "(end)"
Please let me know how I can fix this ? 
0
Avatar
Descartar
Avatar
Bx6MbVtUu1uFbjAI5fwE
Best Answer

I experienced the same as Elizabeth Sandhya. Took me a while to figure out what the problem was, therefore maybe for future reference see below.

In step 2 of the answer of Sudhir Arya, there is a discrepancy between the red text and the screenshot itself. Basically there were two options that worked for me: 'force_delete': 'True' (4 quotes) was succesful, and also 'force_delete': True (2 quotes). Not sure which is the official method, but both worked for me.

However the key to making this work for was to go in two steps: First add the "force_delete" stuff and save. Than "leave" the invoice by restarting the accounting menu and open the invoice again. If I skipped this intermediate step, the system would not allow me to fully delete the invoice.

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now