Skip to content

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Feb 22, 2025

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.

opw-4325310


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #192536

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.

opw-4325310

X-original-commit: 4f8a6b4
@robodoo
Copy link
Contributor

robodoo commented Feb 22, 2025

Pull request status dashboard

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Feb 22, 2025
@fw-bot
Copy link
Contributor Author

fw-bot commented Feb 22, 2025

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Feb 22, 2025
@kitan191
Copy link
Contributor

@robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Feb 22, 2025

@kitan191 @Julien00859 staging failed: ci/runbot on a70c4c7e854617eca974bad7d32453d161dd3cd0 (view more at https://runbot.odoo.com/runbot/build/75505221)

@kitan191
Copy link
Contributor

@robodoo retry

robodoo pushed a commit that referenced this pull request Feb 23, 2025
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.

opw-4325310

closes #198937

X-original-commit: 4f8a6b4
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
@robodoo robodoo added the 18.3 label Feb 23, 2025
@robodoo robodoo closed this Feb 23, 2025
@xmo-odoo xmo-odoo deleted the master-17.0-opw-4325310-fix_thousands_separator_import_bank_statement-pta-418135-fw branch March 7, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

18.3 forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants