Merge lp:~camptocamp/account-invoicing/correct_payment_term_balance_mdh into lp:~account-core-editors/account-invoicing/7.0

Proposed by Matthieu Dietrich @ camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/account-invoicing/correct_payment_term_balance_mdh
Merge into: lp:~account-core-editors/account-invoicing/7.0
Diff against target: 10 lines (+1/-1)
1 file modified
payment_term_rounding/ (+1/-1)
To merge this branch: bzr merge lp:~camptocamp/account-invoicing/correct_payment_term_balance_mdh
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Needs Resubmitting
Review via email:

Commit message

[FIX] correct the payment term's behaviour for 'balance' lines

Description of the change

This fixes an issue with the payment term if the payment term line is set with the Computation Mode "balance"; since before, the amount was not returned, the method compute() on the payment term will skip the date's computation, and always put the current date as the due date.

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :


review: Approve (code review)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

This project is now hosted on Please move your proposal there. This guide may help you

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) :
review: Needs Resubmitting

Unmerged revisions

50. By Matthieu Dietrich @ camptocamp

[FIX] return the value if the line value is 'balance'

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'payment_term_rounding/'
2--- payment_term_rounding/ 2013-07-23 09:53:22 +0000
3+++ payment_term_rounding/ 2014-07-24 09:56:31 +0000
4@@ -64,7 +64,7 @@
5 amt = float_round(amt, precision_rounding=line.amount_round)
6 return float_round(amt, precision_digits=prec)
7 elif line.value == 'balance':
8- amt = float_round(remaining_amount, precision_digits=prec)
9+ return float_round(remaining_amount, precision_digits=prec)
10 return None


People subscribed via source and target branches