From 03b0e153ac5c470f4254afe1bc9e353d8b368c60 Mon Sep 17 00:00:00 2001 From: Sanjay Jamod Date: Wed, 2 Jan 2019 10:08:13 +0000 Subject: [PATCH 1/2] [FIX] account_check_printing: Fix traceback on onchange Method amount_to_text() having self.ensure_one(), it should not be called with empty recordset Closes #29854 closes odoo/odoo#29865 --- addons/account_check_printing/models/account_payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py index 285348d8819..37f3f1b9d53 100644 --- a/addons/account_check_printing/models/account_payment.py +++ b/addons/account_check_printing/models/account_payment.py @@ -56,7 +56,7 @@ class AccountPayment(models.Model): @api.onchange('amount','currency_id') def _onchange_amount(self): res = super(AccountPayment, self)._onchange_amount() - self.check_amount_in_words = self.currency_id.amount_to_text(self.amount) + self.check_amount_in_words = self.currency_id.amount_to_text(self.amount) if self.currency_id else '' return res def _check_communication(self, payment_method_id, communication): From 22637aadecd98c803146573604532254a3136769 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Thu, 3 Jan 2019 09:14:30 +0000 Subject: [PATCH 2/2] [FIX] account: typo introduced in d44437f93830afae60e5354e0b4777413be29c93 closes odoo/odoo#29874 --- .../static/src/js/reconciliation/reconciliation_renderer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js index f97bd454f9a..6c7de327ee0 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js @@ -391,8 +391,8 @@ var LineRenderer = Widget.extend(FieldManagerMixin, { if (line.already_paid === false && (((state.balance.amount_currency < 0 || line.partial_reconcile) && line.amount > 0 && state.st_line.amount > 0 && targetLineAmount < line.amount && partialDebitProps <= 1) || - ((state.balance.amount_currency > 0 || line.partial_reconcile)) - && line.amount < 0 && state.st_line.amount < 0 && targetLineAmount > line.amount && partialCreditProps <= 1)) { + ((state.balance.amount_currency > 0 || line.partial_reconcile) + && line.amount < 0 && state.st_line.amount < 0 && targetLineAmount > line.amount && partialCreditProps <= 1))) { var $cell = $line.find(line.amount > 0 ? '.cell_right' : '.cell_left'); var text; if (line.partial_reconcile) {