← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/account-invoicing/correct_payment_term_balance_mdh into lp:account-invoicing

 

Matthieu Dietrich @ camptocamp has proposed merging lp:~camptocamp/account-invoicing/correct_payment_term_balance_mdh into lp:account-invoicing.

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

Requested reviews:
  Account Core Editors (account-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/account-invoicing/correct_payment_term_balance_mdh/+merge/228070

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.
-- 
https://code.launchpad.net/~camptocamp/account-invoicing/correct_payment_term_balance_mdh/+merge/228070
Your team Account Core Editors is requested to review the proposed merge of lp:~camptocamp/account-invoicing/correct_payment_term_balance_mdh into lp:account-invoicing.
=== modified file 'payment_term_rounding/account.py'
--- payment_term_rounding/account.py	2013-07-23 09:53:22 +0000
+++ payment_term_rounding/account.py	2014-07-24 09:56:31 +0000
@@ -64,7 +64,7 @@
                 amt = float_round(amt, precision_rounding=line.amount_round)
             return float_round(amt, precision_digits=prec)
         elif line.value == 'balance':
-            amt = float_round(remaining_amount,  precision_digits=prec)
+            return float_round(remaining_amount,  precision_digits=prec)
         return None
 
 


Follow ups