openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #10206
[Bug 978885] [NEW] [account] Cancelled invoice cannot be deleted after 'Reset to Draft'
Public bug reported:
Create an invoice and validate it, so that it generates the financial
journals. Then click the 'Cancel' button on the invoice to remove the
posted entries and change the state of the invoice (the module
'account_cancel' should be installed and the invoice journal should
allow cancellation). Then click 'Reset to Draft' to change the invoice
to the 'draft' state. Now try deleting the journal.
Expected result: the invoice should be deleted.
Actual result: error message - "You can not delete an invoice which is open or paid. We suggest you to refund it instead."
The problem is in the 'unlink' method. This checks the state of the
invoice _and_ checks the 'internal_number' is False. The check on the
'internal_number' field is incorrect and should be removed.
In account_invoice.py in the 'unlink' method:
if t['state'] in ('draft', 'cancel') and t['internal_number']==
False:
should be changed to:
if t['state'] in ('draft', 'cancel'):
** Affects: openobject-addons
Importance: Undecided
Status: New
--
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/978885
Title:
[account] Cancelled invoice cannot be deleted after 'Reset to Draft'
Status in OpenERP Addons (modules):
New
Bug description:
Create an invoice and validate it, so that it generates the financial
journals. Then click the 'Cancel' button on the invoice to remove the
posted entries and change the state of the invoice (the module
'account_cancel' should be installed and the invoice journal should
allow cancellation). Then click 'Reset to Draft' to change the invoice
to the 'draft' state. Now try deleting the journal.
Expected result: the invoice should be deleted.
Actual result: error message - "You can not delete an invoice which is open or paid. We suggest you to refund it instead."
The problem is in the 'unlink' method. This checks the state of the
invoice _and_ checks the 'internal_number' is False. The check on the
'internal_number' field is incorrect and should be removed.
In account_invoice.py in the 'unlink' method:
if t['state'] in ('draft', 'cancel') and t['internal_number']==
False:
should be changed to:
if t['state'] in ('draft', 'cancel'):
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/978885/+subscriptions
Follow ups
References