From 31fc8fdab3fd433fb2d6e9b01b91bd83efd119f8 Mon Sep 17 00:00:00 2001 From: Jitendra Prajapati Date: Tue, 11 Aug 2015 19:18:09 +0530 Subject: [PATCH] [FIX]account_voucher: move_line_id field is no more available in the Voucher Lines. so i have removed related code on if condition. --- addons/account_voucher/account_voucher.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 629e55eec6d..55c50bdb838 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -234,11 +234,9 @@ class AccountVoucher(models.Model): :return: Tuple build as (remaining amount not allocated on voucher lines, list of account_move_line created in this method) :rtype: tuple(float, list of int) ''' - prec = self.company_id.currency_id.rounding for line in self.line_ids: #create one move line per voucher line where amount is not 0.0 - # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value) - if not line.price_subtotal and not (line.move_line_id and not float_compare(line.move_line_id.debit, line.move_line_id.credit, precision_digits=prec) and not float_compare(line.move_line_id.debit, 0.0, precision_digits=prec)): + if not line.price_subtotal: continue # convert the amount set on the voucher line into the currency of the voucher's company # this calls res_curreny.compute() with the right context, so that it will take either the rate on the voucher if it is relevant or will use the default behaviour