Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-opw-574314-port-mma into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-574314-port-mma/+merge/132265

Hello,

      I have Fixed the issue of not allowed to delete a invoice in draft 
state(re-opened from cancel state)
      Code is forward port from 6.1


Thanks
Mayur
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-574314-port-mma/+merge/132265
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-opw-574314-port-mma.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2012-10-29 09:17:13 +0000
+++ account/account_invoice.py	2012-10-31 09:25:29 +0000
@@ -1078,7 +1078,7 @@
                         raise osv.except_osv(_('Error!'), _('You cannot cancel an invoice which is partially paid. You need to unreconcile related payment entries first.'))
 
         # First, set the invoices as cancelled and detach the move ids
-        self.write(cr, uid, ids, {'state':'cancel', 'move_id':False})
+        self.write(cr, uid, ids, {'state':'cancel', 'move_id':False, 'internal_number': False})
         if move_ids:
             # second, invalidate the move(s)
             account_move_obj.button_cancel(cr, uid, move_ids, context=context)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to