summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2012-11-12 11:09:15 +0100
committerFabien Pinckaers <fp@tinyerp.com>2012-11-12 11:09:15 +0100
commit9f13d25dbdf7d7d2f4c8a38ae57bd2a6ebf3ca4b (patch)
treea3f15551e6f6dd6a542cd7dbfc0d729aa93d4134
parent556a8cc61e9066583e3a2849c1a267b5ecd5aa63 (diff)
parentf56a1333d835ca9bcc89dab3b7dac6d174d5171a (diff)
[MERGE] fix when cancelling and posting invoice again with ref numbers
bzr revid: fp@tinyerp.com-20121112100915-vncsox9ybz67iai3
-rw-r--r--addons/account/account_invoice.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index b01fc974bef..b37118c3baa 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -983,13 +983,13 @@ class account_invoice(osv.osv):
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