odoo/odoo#198937
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:master-17.0-opw-4325310-fix_thousands_separator_import_bank_statement-pta-418135-fw
- head
- 6f44d9951993c09a8c68835b7e56690110754206
- merged
- 8 months ago by Bugfix, Anh Thao Pham (pta)
odoo/odoo | |
---|---|
17.0 | #192536 |
saas-17.4 | #198924 |
18.0 | #198928 |
saas-18.1 | #198934 |
saas-18.2 | #198935 |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #198937 |
[FW][FIX] base_import: fix selector with an empty string
Steps to reproduce:
- Install Accounting
- On Accounting dashboard, click on "Import File" button of Bank journal
- Select a CSV file with bank statements
- On the left menu, select "No Separator" as "Thousands Separator"
Issue:
"Comma" is displayed as selected instead the first time.
The second time "No Separator" stays as selected.
However, the value sent when testing or importing is not the correct one.
Cause:
"No Separator" option should have an empty string as value.
However, during the generation of the "select" element, the value for the "option" element is evaluated with:
opt.value or opt
As opt.value
is the empty string (evaluated to False), opt
is used instead, even if it is an object, which is not correct.
The main issue is that the empty string is not handled as a valid value.
Solution:
Handle the empty string as an acceptable value.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #192536