From bf7920746b31c88af955e06d862515598cfcb76c Mon Sep 17 00:00:00 2001 From: wan Date: Fri, 25 Sep 2020 14:35:11 +0000 Subject: [PATCH] [FIX] account: do not display "false" as line name in automatic entry If we select a line without an name for the automatic entry wizard, it will be displayed as "false" in the preview widget. Even though, the value will be set to NULL in the database, we don't want to see "false" in the preview. closes odoo/odoo#58680 X-original-commit: e6c93c2632555b100d31ba6745a8bca62d44450e Signed-off-by: Laurent Smet --- addons/account/wizard/account_automatic_entry_wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_automatic_entry_wizard.py b/addons/account/wizard/account_automatic_entry_wizard.py index 89e87aa769c..66afab6da55 100644 --- a/addons/account/wizard/account_automatic_entry_wizard.py +++ b/addons/account/wizard/account_automatic_entry_wizard.py @@ -197,7 +197,7 @@ class AutomaticEntryWizard(models.TransientModel): move_data['new_date']['line_ids'] += [ (0, 0, { - 'name': aml.name, + 'name': aml.name or '', 'debit': reported_debit, 'credit': reported_credit, 'amount_currency': reported_amount_currency, @@ -217,7 +217,7 @@ class AutomaticEntryWizard(models.TransientModel): ] move_data[aml.move_id.date]['line_ids'] += [ (0, 0, { - 'name': aml.name, + 'name': aml.name or '', 'debit': reported_credit, 'credit': reported_debit, 'amount_currency': -reported_amount_currency,