Skip to content

Conversation

@feg-adhoc
Copy link

No description provided.

@feg-adhoc feg-adhoc force-pushed the 18.0-mig-account_statement_import_sheet_file branch 5 times, most recently from 74d9ad5 to 3145831 Compare December 23, 2024 14:35
@tate11
Copy link

tate11 commented Jan 15, 2025

Thank you for your effort. Gives a date error
time data '' does not match format '%d/%m/%Y'

Garanti Bankası 0 1 comma dot comma " %d/%m/%Y Date simple_value Amount Label

@feg-adhoc feg-adhoc force-pushed the 18.0-mig-account_statement_import_sheet_file branch 7 times, most recently from 00f7713 to 9d48f60 Compare February 4, 2025 14:43
@feg-adhoc
Copy link
Author

Hello @tate11 ! Thank you for your feedback. Could you please specify how the file you used for testing is structured and how the mapping is configured? I am unable to reproduce the error.

@tate11
Copy link

tate11 commented Feb 4, 2025

Hello @tate11 ! Thank you for your feedback. Could you please specify how the file you used for testing is structured and how the mapping is configured? I am unable to reproduce the error.

In Turkey, the date is used as day/month/year. It gives an error while importing like this.

@feg-adhoc
Copy link
Author

@tate11 You need to change the mapping configuration and set the timestamp format field to %d/%m/%Y, and it will work correctly.

@tate11
Copy link

tate11 commented Feb 4, 2025

@tate11 You need to change the mapping configuration and set the timestamp format field to %d/%m/%Y, and it will work correctly.
#747 (comment)
I tried this when we opened the issue .I opened this issue on top of that.
If you want, I can put the sample bank CSV file here.

@feg-adhoc
Copy link
Author

Hello @tate11 getting back to this… The tests you ran, were they done before the latest code changes? If so, it might be worth checking again with the updated version. Also, could you please share the sample bank CSV file? That would help me take a closer look.

@tate11
Copy link

tate11 commented Feb 26, 2025

Screenshot 2025-02-26 at 09-55-43 BNK1 sample bank statement-01 xls

Hello @tate11 getting back to this… The tests you ran, were they done before the latest code changes? If so, it might be worth checking again with the updated version. Also, could you please share the sample bank CSV file? That would help me take a closer look.

Thank you very much I tested the latest status today and it works.
Screenshot 2025-02-26 at 09-58-11 BNK1 sample bank statement-01111.xls

@feg-adhoc feg-adhoc force-pushed the 18.0-mig-account_statement_import_sheet_file branch 5 times, most recently from e248a9a to 9c10eb1 Compare March 19, 2025 13:18
@cav-adhoc cav-adhoc force-pushed the 18.0-mig-account_statement_import_sheet_file branch from 9c10eb1 to 4425d1d Compare April 8, 2025 18:24
xtanuiha and others added 11 commits November 6, 2025 09:01
Currently translated at 100.0% (99 of 99 strings)

Translation: bank-statement-import-17.0/bank-statement-import-17.0-account_statement_import_sheet_file
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-17-0/bank-statement-import-17-0-account_statement_import_sheet_file/zh_CN/
Currently translated at 100.0% (99 of 99 strings)

Translation: bank-statement-import-17.0/bank-statement-import-17.0-account_statement_import_sheet_file
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-17-0/bank-statement-import-17-0-account_statement_import_sheet_file/zh_CN/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: bank-statement-import-17.0/bank-statement-import-17.0-account_statement_import_sheet_file
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-17-0/bank-statement-import-17-0-account_statement_import_sheet_file/
Currently translated at 100.0% (104 of 104 strings)

Translation: bank-statement-import-17.0/bank-statement-import-17.0-account_statement_import_sheet_file
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-17-0/bank-statement-import-17-0-account_statement_import_sheet_file/it/
…parser header

When importing an Excel file with a header and the field header_lines_skip_count is set to its default value (0), the header is retrieved using the -1 index (the last row).
complementary to commit OCA@13285ab
Copilot AI review requested due to automatic review settings November 6, 2025 13:11
@feg-adhoc feg-adhoc force-pushed the 18.0-mig-account_statement_import_sheet_file branch from 4422b47 to f696ca8 Compare November 6, 2025 13:11
@feg-adhoc
Copy link
Author

@carlos-lopez-tecnativa Hi Carlos! I've applied the requested cherry-picks. I also confirmed that the changes you pointed to were already present in the code (which is likely why one of the commits was empty during the cherry-pick).

@pedrobaeza I believe this is ready to merge now!
Thanks!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 42 out of 49 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)
transactions = list(
itertools.chain.from_iterable(
map(lambda line: self._convert_line_to_transactions(line), lines)
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This 'lambda' is just a simple wrapper around a callable object. Use that object directly.

Suggested change
map(lambda line: self._convert_line_to_transactions(line), lines)
map(self._convert_line_to_transactions, lines)

Copilot uses AI. Check for mistakes.
if original_currency == currency:
original_currency = None
if not amount:
amount = original_amount
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable amount is not used.

Copilot uses AI. Check for mistakes.
original_currency = None
if not amount:
amount = original_amount
original_amount = "0.0"
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable original_amount is not used.

Suggested change
original_amount = "0.0"

Copilot uses AI. Check for mistakes.
default=_get_default_mapping_id,
)

def _parse_file(self, data_file):
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixing implicit and explicit returns may indicate an error, as implicit returns always return None.

Copilot uses AI. Check for mistakes.
else currency_code
)

def _decimal(column_name, values):
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixing implicit and explicit returns may indicate an error, as implicit returns always return None.

Copilot uses AI. Check for mistakes.
return Parser.parse(
data_file, self.sheet_mapping_id, self.statement_filename
)
except BaseException as exc:
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except block directly handles BaseException.

Suggested change
except BaseException as exc:
except Exception as exc:

Copilot uses AI. Check for mistakes.
Comment on lines +140 to +141
except Exception:
pass
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
except Exception:
pass
except Exception as e:
# Could not convert column_name_or_index to int; skip it.
_logger.warning(
"Failed to convert '%s' to int in mapping for column '%s': %s",
column_name_or_index, column_name, e
)

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +26
{
"name": "Bank Statement TXT/CSV/XLSX Import",
"summary": "Import TXT/CSV or XLSX files as Bank Statements in Odoo",
"version": "18.0.1.0.0",
"category": "Accounting",
"website": "https://github.com/OCA/bank-statement-import",
"author": "ForgeFlow, CorporateHub, Odoo Community Association (OCA)",
"maintainers": ["alexey-pelykh"],
"license": "AGPL-3",
"installable": True,
"depends": [
"account_statement_import_file",
],
"external_dependencies": {"python": ["xlrd", "chardet"]},
"data": [
"security/ir.model.access.csv",
"data/map_data.xml",
"views/account_statement_import_sheet_mapping.xml",
"views/account_statement_import.xml",
"views/account_journal_views.xml",
],
}
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement has no effect.

Copilot uses AI. Check for mistakes.
@feg-adhoc
Copy link
Author

@OCA/banking-maintainers Hi! Could you help me merge this module?

@pedrobaeza
Copy link
Member

@feg-adhoc there are up to 4 persons requesting changes to you. Please check their comments.

@feg-adhoc
Copy link
Author

@pedrobaeza I've already made the necessary changes!

@pedrobaeza
Copy link
Member

The other persons should now review. Please ping them.

@rov-adhoc
Copy link
Contributor

@Daemo00 @carlos-lopez-tecnativa @victoralmau @cvinh
Could you please take a look at @feg-adhoc’s PR when you have a moment? Thanks in advance!

Copy link

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also include this fix ?

I made a PR on your branch:

Copy link

@Daemo00 Daemo00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing from my first review (more than 4 months ago) #747 (review) has been addressed or replied to.

The same was true when you requested a review update the last time (more than 2 months ago), see #747 (review).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.