odoo/odoo — pull request #1200 by rgo-odoo (2014-07-16 06:40:20+00:00)
Title: [FIX] Fixed the traceback which is faced when we unreconcile the payment...

... having same reconcile tag more than one time in it's journal items. (Maintenance Case: 610287)

If an user tries to unreconcile the payment which has same reconciliation tag more than one time in it's journal item, it will end with a traceback which will say,

File "/opt/openerp/server/openerp/addons/account_voucher/account_voucher.py", line 963, in cancel_voucher
reconcile_pool.unlink(cr, uid, [line.reconcile_id.id])
File "/opt/openerp/server/openerp/addons/account/account.py", line 1649, in unlink
if move_rec.opening_reconciliation:
File "/opt/openerp/server/openerp/osv/orm.py", line 504, in __getattr__
raise AttributeError(e)
AttributeError: 'Field opening_reconciliation not found in browse_record(account.move.reconcile, 4458)'

This is because the move line's browse_record hasn't been refreshed yet and is holding the deleted 'account.move.reconcile' record reference in it's 'reconcile_id' field.

This branch fixes this issue, kindly review it.

Thanks.