Skip to content
Snippets Groups Projects
Commit be351b4c authored by Saurabh Choraria's avatar Saurabh Choraria
Browse files

[FIX] base_import: raise ImportValidationError when invalid seperator selected

When a user tries to import the CSV file with a different separator at that
time, the values in mapper and rows_to_import are not correctly mapped. So
the traceback will be generated.

Steps to reproduce:
1. Click on import in the bank statement.
2. Select any CSV file for the bank statement line or can download and import
this file https://drive.google.com/file/d/1lnScw4RN6T01pOkyNON8vvb3FQOPiy1O/view?usp=drive_link


3. Select any separator other than a comma.
4. Click on the test or Import button.
5. Error will occur.

Error: IndexError: list index out of range.

To solve this issue, a row's length is checked with the
number of fields.

sentry-4021250095

closes odoo/odoo#134502

X-original-commit: 62253417
Signed-off-by: default avatarAchraf Ben Azzouz (abz) <abz@odoo.com>
Signed-off-by: default avatarSaurabh Choraria (sauc) <sauc@odoo.com>
parent dac2375e
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment