Rifakat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-5716-rha into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-5716-rha/+merge/87454
Hello,
Partial reconcile disappears when we cancel 2nd payment order.
While we do partial payments for customer/supplier invoice and cancel one of
the partial payment then reconcile gets deleted and hence rest of the partial
payments history is not maintained.
This fixes the problem, kindly review it.
Regards,
Rifakat
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-5716-rha/+merge/87454
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-5716-rha.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2011-10-24 07:25:44 +0000
+++ account_voucher/account_voucher.py 2012-01-04 10:42:25 +0000
@@ -586,12 +586,22 @@
recs = []
for line in voucher.move_ids:
if line.reconcile_id:
- recs += [line.reconcile_id.id]
- if line.reconcile_partial_id:
- recs += [line.reconcile_partial_id.id]
-
+ recs = [rec.id for rec in line.reconcile_id.line_id]
+ recs.remove(line.id)
+ partial_ids = reconcile_pool.create(cr, uid, {
+ 'type': 'auto',
+ 'line_id': False,
+ 'line_partial_ids': [(6, 0, recs)]})
+ self.pool.get('account.move.line').write(cr, uid, [line.id], {
+ 'reconcile_id': False,
+ 'reconcile_partial_id': False
+ }, update_check=False)
+
+ self.pool.get('account.move.line').write(cr, uid, recs, {
+ 'reconcile_id': False,
+ 'reconcile_partial_id': partial_ids
+ }, update_check=False)
reconcile_pool.unlink(cr, uid, recs)
-
if voucher.move_id:
move_pool.button_cancel(cr, uid, [voucher.move_id.id])
move_pool.unlink(cr, uid, [voucher.move_id.id])
_______________________________________________
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