Delete an invoice after validation? (Odoo 8)

Publié par David le

  • Install the account_cancel module.
  • Go to file:
    • sudo nano <odoo>/addons/account/account_invoice.py
  •  Comment the function unlink like:
&nbsp; &nbsp; @api.multi        
    def unlink(self):
    #for invoice in self:
        #if invoice.state not in ('draft', 'cancel'):
        #raise UserError(_('You cannot delete an invoice which is not draft or cancelled. You should refund it instead.'))        
        #elif invoice.move_name:
        #raise UserError(_('You cannot delete an invoice after it has been validated (and received a number). You can set it back to "Draft" state and modify its content, then re-confirm it.')) 
        return super(AccountInvoice, self).unlink()
  • Restart Odoo server.
  • Go to the accounting view and remove the canceled invoice(s).
Catégories : Odoo

0 commentaire

Laisser un commentaire

Emplacement de l’avatar

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *