Merge lp:~therp-nl/openobject-addons/7.0-lp1080840-wrong_amounts_on_refund_vouchers into lp:openobject-addons
Status: | Needs review |
---|---|
Proposed branch: | lp:~therp-nl/openobject-addons/7.0-lp1080840-wrong_amounts_on_refund_vouchers |
Merge into: | lp:openobject-addons |
Diff against target: |
243 lines (+60/-36) 2 files modified
account_voucher/account_voucher.py (+59/-36) account_voucher/test/account_voucher.yml (+1/-0) |
To merge this branch: | bzr merge lp:~therp-nl/openobject-addons/7.0-lp1080840-wrong_amounts_on_refund_vouchers |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+135774@code.launchpad.net |
Description of the change
Sorry for this stop-gap patch. It is the result of several weaknesses in the design of the voucher model:
- using the same functions for purchase/sale vouchers as for payment/receipt vouchers
- in doing so, using 'amount' (and in some cases its sign logic) as a given for payment/receipt vouchers and as a resulting sum in the case of purchase/sale vouchers
- allowing for both negative amounts on voucher lines as well as a debit/credit selection (without taking them into account consistently)
- insisting on showing the total voucher amount [1] with a positive sign and [2] before saving the voucher (i.e. using only on_change methods)
The voucher module is in dire need of a refactoring, in which API changes may be unavoidable. Hopefully that can be realized in 7.1.
This branch validates all the YAML tests included in the addon. I actually developed tests for this particular bug, but in order to run them I had to add a number of invisible fields to account_
Unmerged revisions
- 8078. By Stefan Rijnhart (Opener)
-
[FIX] account_voucher: wrong amounts with refunds using debet/credit field