-
-
Notifications
You must be signed in to change notification settings - Fork 472
[18.0][MIG] account_statement_import_sheet_file: Migration to 18.0 #747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] account_statement_import_sheet_file: Migration to 18.0 #747
Conversation
74d9ad5 to
3145831
Compare
|
Thank you for your effort. Gives a date error |
00f7713 to
9d48f60
Compare
|
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. |
|
@tate11 You need to change the mapping configuration and set the timestamp format field to %d/%m/%Y, and it will work correctly. |
|
|
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. |
account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py
Outdated
Show resolved
Hide resolved
e248a9a to
9c10eb1
Compare
9c10eb1 to
4425d1d
Compare
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/
…iles in addition to XLS and CSV formats
…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
4422b47 to
f696ca8
Compare
|
@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! |
There was a problem hiding this 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.
account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py
Outdated
Show resolved
Hide resolved
| ) | ||
| transactions = list( | ||
| itertools.chain.from_iterable( | ||
| map(lambda line: self._convert_line_to_transactions(line), lines) |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| map(lambda line: self._convert_line_to_transactions(line), lines) | |
| map(self._convert_line_to_transactions, lines) |
| if original_currency == currency: | ||
| original_currency = None | ||
| if not amount: | ||
| amount = original_amount |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| original_currency = None | ||
| if not amount: | ||
| amount = original_amount | ||
| original_amount = "0.0" |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| original_amount = "0.0" |
| default=_get_default_mapping_id, | ||
| ) | ||
|
|
||
| def _parse_file(self, data_file): |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| else currency_code | ||
| ) | ||
|
|
||
| def _decimal(column_name, values): |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| return Parser.parse( | ||
| data_file, self.sheet_mapping_id, self.statement_filename | ||
| ) | ||
| except BaseException as exc: |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| except BaseException as exc: | |
| except Exception as exc: |
| except Exception: | ||
| pass |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
| 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 | |
| ) |
| { | ||
| "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", | ||
| ], | ||
| } |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
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.
|
@OCA/banking-maintainers Hi! Could you help me merge this module? |
|
@feg-adhoc there are up to 4 persons requesting changes to you. Please check their comments. |
|
@pedrobaeza I've already made the necessary changes! |
|
The other persons should now review. Please ping them. |
|
@Daemo00 @carlos-lopez-tecnativa @victoralmau @cvinh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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).

No description provided.