Merge lp://staging/~therp-nl/additional-discount/fix_lp1102075_move_lines into lp://staging/additional-discount
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~therp-nl/additional-discount/fix_lp1102075_move_lines |
Merge into: | lp://staging/additional-discount |
Diff against target: |
270 lines (+163/-22) 5 files modified
additional_discount/__init__.py (+2/-3) additional_discount/__openerp__.py (+3/-1) additional_discount/model/__init__.py (+13/-0) additional_discount/model/common.py (+6/-5) additional_discount/model/invoice.py (+139/-13) |
To merge this branch: | bzr merge lp://staging/~therp-nl/additional-discount/fix_lp1102075_move_lines |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Georges Racinet | Pending | ||
Anybox | Pending | ||
Stefan Rijnhart (Opener) | Pending | ||
Review via email: mp+161957@code.staging.launchpad.net |
This proposal supersedes a proposal from 2013-05-01.
Description of the change
The original merge proposal to generate additional move lines for the discount has been extensively reworked:
- Adjust the original move lines instead of creating additional ones. In this way the line that should be paid will have an amount equal to an incoming or outgoing payment. This makes for easier reconciliation.
- Rounding had been made more consistent all over
- Nevertheless an catch all test has been added to prevent the additional discount from ever creating an unbalanced move
Unmerged revisions
- 31. By Ronald Portier (Therp)
-
[FIX] Previous revision moved view xml, but forgot to adapt __openerp__.py
- 30. By Ronald Portier (Therp)
-
[RFR] Added standard organization to module
[FIX] Rounding issues
[FIX] Prevent additional discount from creating unbalanced moves - 29. By Ronald Portier (Therp)
-
[IMP] Generate move-lines for discount.
It is probably a good idea to have a look at rounding issues now. They can get ugly really easily. At least make sure that the amount to pay is the same as on the invoice that goes out to the customer.
Another thing to consider: if the move line's account is set to reconcile, would it be a good idea to do a partial reconciliation with its discount line at this point? This would require some work in the method cancelling the invoice because you would have to undo any move internal reconciliation before the move line object protests against unlinking reconciled items.