Merge lp:~openerp-community-committers/openobject-addons/5.0-bugfix-599090 into lp:~openerp-community-committers/openobject-addons/5.0
Status: | Needs review | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~openerp-community-committers/openobject-addons/5.0-bugfix-599090 | ||||
Merge into: | lp:~openerp-community-committers/openobject-addons/5.0 | ||||
Diff against target: |
50 lines (+23/-4) 1 file modified
account/account_move_line.py (+23/-4) |
||||
To merge this branch: | bzr merge lp:~openerp-community-committers/openobject-addons/5.0-bugfix-599090 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Community Committers | Pending | ||
Review via email: mp+41375@code.launchpad.net |
Description of the change
account.move.line checks some fields are not updated if the line is reconciled or the move is not in draft state. There is a problem, though, that forbids users from removing unreconciled entries of a draft account moves.
When the user wants to remove a couple of lines of a draft move (leaving the move still in valid state), the system will call account.move validate() function. This function calls account.move.line write() for all account move lines of the move, forbiding the removal if there are move lines in reconciled state. The problem is that account.move's validate() function is not necessarily changing any of the forbiden values, it simply ensures they're properly set. As account.move.line's write() function doesn't check if those values are really changing it always raises an exception.
The patch has been in production in several customers for several months now.
Unmerged revisions
- 2881. By Albert Cervera i Areny - http://www.NaN-tic.com
-
[IMP] account: Be less restrictive in what can be done when the move is reconciled or is not in draft state.