Merge lp:~openerp-dev/openobject-addons/trunk-bug-946866-amp into lp:openobject-addons

Proposed by Amit Parik
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-946866-amp
Merge into: lp:openobject-addons
Diff against target: 12 lines (+1/-1)
1 file modified
account/account_invoice.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-946866-amp
Reviewer Review Type Date Requested Status
Amit Parik (community) Abstain
OpenERP Core Team Pending
Review via email: mp+99671@code.launchpad.net

Description of the change

Fixes the delete invoice problem

Once the invoice is confirmed the internal number id generated and after that when we cancel it internal_number doesn't set as a False.
That's why when we cancelled the invoice and then try to delete it or "set to draft" the invoice and then try to delete. It doesn't allow to delete.

This fix is solved this problem.

Thanks.

To post a comment you must log in.
Revision history for this message
Amit Parik (amit-parik) wrote :

Hance the bug is invalidted by FP, I am going to close this branch!

review: Abstain

Unmerged revisions

6696. By Amit Parik

[FIX] account : Fixes not able to delete draft and cancel invoice problem once it's confirmed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2012-02-28 14:08:16 +0000
+++ account/account_invoice.py 2012-03-28 06:39:22 +0000
@@ -1030,7 +1030,7 @@
1030 raise osv.except_osv(_('Error !'), _('You can not cancel an invoice which is partially paid! You need to unreconcile related payment entries first!'))1030 raise osv.except_osv(_('Error !'), _('You can not cancel an invoice which is partially paid! You need to unreconcile related payment entries first!'))
10311031
1032 # First, set the invoices as cancelled and detach the move ids1032 # First, set the invoices as cancelled and detach the move ids
1033 self.write(cr, uid, ids, {'state':'cancel', 'move_id':False})1033 self.write(cr, uid, ids, {'state':'cancel', 'move_id':False, 'internal_number': False})
1034 if move_ids:1034 if move_ids:
1035 # second, invalidate the move(s)1035 # second, invalidate the move(s)
1036 account_move_obj.button_cancel(cr, uid, move_ids, context=context)1036 account_move_obj.button_cancel(cr, uid, move_ids, context=context)

Subscribers

People subscribed via source and target branches

to all changes: