Comment 4 for bug 1149116

Revision history for this message
Niels Huylebroeck (red15) wrote : Re: [Bug 1149116] Re: [7.0]Cancelling a bank statement does not set voucher to state draft

Somesh,

Have you consulted my proposed changes which I've requested to be merged
into your proposed fix ?

Please look here
https://code.launchpad.net/~openerp-community/openobject-addons/7.0-587621-opw-orphan-voucher/+merge/154932

Regards,
Niels

2013/3/22 Niels Huylebroeck <email address hidden>

> Thank you Somesh,
>
> The patch worked but I found that it would leave draft vouchers laying
> around if you change the amount after cancelling the bank statement.
>
> I've provided another small (but well commented) patch which should help
> you understand where the problem is coming from.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1149116
>
> Title:
> [7.0]Cancelling a bank statement does not set voucher to state draft
>
> Status in OpenERP Addons (modules):
> Fix Committed
>
> Bug description:
> If you look at the code here you can see the state of the bank statement
> is set to draft when cancelled .
>
> http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/account/account_bank_statement.py#L448
>
> However each of the bank statement lines has an account.voucher linked
> to it which is set to state 'cancel' the result is that the user
> cannot alter any of the reconciliation on the bank statement.
>
> The preferred solution would be to reset the vouchers to the state
> 'draft' whenever the related bank statement is also set to draft.
>
> This is a bug that was not present in the 6.0/6.1 branches because you
> were unable to cancel a bank statement when any of the generated moves
> was reconciled, obviously it's a good improvement in v7.0 to allow
> cancelling but since the way the vouchers (for reconciling) are
> created was changed (also in v7.0) you can not just create a new
> voucher as you would have done in v6.x
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/1149116/+subscriptions
>

--
Niels Huylebroeck
Bubbles-IT
Tel. : +32 (0)9 328 33 88
Web : http://www.bubbles-it.be