← Back to team overview

openerp-india team mailing list archive

[Bug 1112752] [NEW] delete invoice not possible in draft when comes from validate-cancel

 

Public bug reported:

Hello in latest revno at 6.1 and 7.0

Create a fresh installation with demo data.
Install account,account_cancel modules
Configure sale test journal to allow cancel entries
Open the customer invoice in draft
Validate the invoice
Cancel invoice
try to delete
Here raise the message: you can delete paid or validated invoice, you must refund it.

If you check the unlink method in invoice object code verify
internal_number==False here:

http://bazaar.launchpad.net/~openerp/openobject-
addons/7.0/view/head:/account/account_invoice.py#L455

but when you cancel internal_number is not False:

http://bazaar.launchpad.net/~openerp/openobject-
addons/7.0/view/head:/account/account_invoice.py#L1081

Posible solution:

* Dont verify internal_number==False, i consider is not necessary

** Affects: openobject-addons
     Importance: Medium
     Assignee: OpenERP R&D Addons Team 1 (openerp-dev-addons1)
         Status: New

** Changed in: openobject-addons
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1112752

Title:
  delete invoice not possible in draft when comes from validate-cancel

Status in OpenERP Addons (modules):
  New

Bug description:
  Hello in latest revno at 6.1 and 7.0

  Create a fresh installation with demo data.
  Install account,account_cancel modules
  Configure sale test journal to allow cancel entries
  Open the customer invoice in draft
  Validate the invoice
  Cancel invoice
  try to delete
  Here raise the message: you can delete paid or validated invoice, you must refund it.

  If you check the unlink method in invoice object code verify
  internal_number==False here:

  http://bazaar.launchpad.net/~openerp/openobject-
  addons/7.0/view/head:/account/account_invoice.py#L455

  but when you cancel internal_number is not False:

  http://bazaar.launchpad.net/~openerp/openobject-
  addons/7.0/view/head:/account/account_invoice.py#L1081

  Posible solution:

  * Dont verify internal_number==False, i consider is not necessary

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1112752/+subscriptions


Follow ups

References