account-payment-team team mailing list archive
-
account-payment-team team
-
Mailing list archive
-
Message #00299
[Merge] lp:~agilebg/account-payment/imp_account_voucher_cash_basis_comments into lp:account-payment/7.0
Lorenzo Battistini - Agile BG has proposed merging lp:~agilebg/account-payment/imp_account_voucher_cash_basis_comments into lp:account-payment/7.0.
Requested reviews:
Account Payment (account-payment-team)
For more details, see:
https://code.launchpad.net/~agilebg/account-payment/imp_account_voucher_cash_basis_comments/+merge/204625
--
https://code.launchpad.net/~agilebg/account-payment/imp_account_voucher_cash_basis_comments/+merge/204625
Your team Account Payment is requested to review the proposed merge of lp:~agilebg/account-payment/imp_account_voucher_cash_basis_comments into lp:account-payment/7.0.
=== modified file 'account_voucher_cash_basis/account_voucher.py'
--- account_voucher_cash_basis/account_voucher.py 2013-06-17 09:26:01 +0000
+++ account_voucher_cash_basis/account_voucher.py 2014-02-04 10:13:43 +0000
@@ -71,7 +71,7 @@
res = 0.0
for inv_move_line in invoice.move_id.line_id:
if inv_move_line.account_id.type in ('receivable','payable'):
- res += inv_move_line.debit or inv_move_line.credit # can both be presents?
+ res += inv_move_line.debit or inv_move_line.credit
return res
def get_invoice_total_currency(self, invoice):
@@ -150,6 +150,7 @@
'total'
] = self.get_invoice_total(line.move_line_id.invoice)
if res:
+ # we use line_total as it can be != writeoff_amount in case of multi currency
write_off_per_invoice = voucher.line_total / len(res)
if not voucher.company_id.allow_distributing_write_off and len(res) > 1 and write_off_per_invoice:
raise orm.except_orm(_('Error'), _(
Follow ups