From b54dbc8edf7f1fc78b7dc1a15164b4cc7ed1ab56 Mon Sep 17 00:00:00 2001 From: SHEREEF PT Date: Fri, 24 Nov 2017 11:42:15 +0530 Subject: [PATCH] [FIX]: Used before referenced error --- round_off_invoices/__manifest__.py | 2 +- round_off_invoices/models/config.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/round_off_invoices/__manifest__.py b/round_off_invoices/__manifest__.py index 0eab50565..c26771ee8 100644 --- a/round_off_invoices/__manifest__.py +++ b/round_off_invoices/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'Round Off Invoice Amount', - 'version': '10.0.1.0.0', + 'version': '10.0.2.0.0', 'summary': 'Allows Rounding on Invoice Amount', 'description': 'Invoice amount is rounded to their nearest digits excluding the decimal part', 'category': 'Accounting', diff --git a/round_off_invoices/models/config.py b/round_off_invoices/models/config.py index cc8c77726..e0930d43d 100644 --- a/round_off_invoices/models/config.py +++ b/round_off_invoices/models/config.py @@ -190,7 +190,7 @@ class AccountRoundOff(models.Model): 'price': total + self.round_off_value, 'account_id': inv.account_id.id, 'date_maturity': inv.date_due, - 'amount_currency': diff_currency and amount_currency, + 'amount_currency': diff_currency and total_currency, 'currency_id': diff_currency and inv.currency_id.id, 'invoice_id': inv.id }) @@ -202,7 +202,7 @@ class AccountRoundOff(models.Model): 'price': -self.round_off_value, 'account_id': acc_id, 'date_maturity': inv.date_due, - 'amount_currency': diff_currency and amount_currency, + 'amount_currency': diff_currency and total_currency, 'currency_id': diff_currency and inv.currency_id.id, 'invoice_id': inv.id })