Somesh Khare(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-577189-skh into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
Related bugs:
Bug #1012723 in OpenERP Addons: "account: when you set "Skip 'Draft' State
for Manual Entries" on sale journal, invoices allow gap in numbering"
https://bugs.launchpad.net/openobject-addons/+bug/1012723
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577189-skh/+merge/117417
Hello Sir,
[Fix]: account_invoice: when you set option Skip Draft State for Manual Entries
on sale journal invoice sequence number incremented
Steps to reproduce:
1 - Install account_cancel module
2 - Set "Skip 'Draft' State for Manual Entries" on sales journal
3 - Create a new invoice and validate it (eg:invoice number 'SAJ/2012/0001')
4 - Cancel the invoice and validate it again
Get 'SAJ/2012/0002' as invoice number
This branch fixes this issue. Kindly review the branch and please share your
views.
Thanks,
Somesh Khare
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577189-skh/+merge/117417
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-577189-skh.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2012-07-04 16:33:07 +0000
+++ account/account_invoice.py 2012-07-31 11:48:19 +0000
@@ -943,13 +943,13 @@
for i in line:
i[2]['period_id'] = period_id
+ ctx.update({'invoice':inv})
move_id = move_obj.create(cr, uid, move, context=ctx)
new_move_name = move_obj.browse(cr, uid, move_id, context=ctx).name
# make the invoice point to that move
self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name}, context=ctx)
# Pass invoice in context in method post: used if you want to get the same
# account move reference when creating the same invoice after a cancelled one:
- ctx.update({'invoice':inv})
move_obj.post(cr, uid, [move_id], context=ctx)
self._log_event(cr, uid, ids)
return True
_______________________________________________
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