odoo-addon-account-statement-import-sheet-file 17.0.1.1.2__py3-none-any.whl → 18.0.1.0.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/account_statement_import_sheet_file/README.rst +6 -6
- odoo/addons/account_statement_import_sheet_file/__manifest__.py +2 -2
- odoo/addons/account_statement_import_sheet_file/i18n/account_statement_import_sheet_file.pot +7 -17
- odoo/addons/account_statement_import_sheet_file/i18n/tr.po +10 -10
- odoo/addons/account_statement_import_sheet_file/models/account_statement_import.py +2 -2
- odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py +7 -5
- odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py +13 -14
- odoo/addons/account_statement_import_sheet_file/static/description/index.html +4 -4
- odoo/addons/account_statement_import_sheet_file/tests/test_account_statement_import_sheet_file.py +118 -397
- odoo/addons/account_statement_import_sheet_file/views/account_statement_import_sheet_mapping.xml +9 -11
- {odoo_addon_account_statement_import_sheet_file-17.0.1.1.2.dist-info → odoo_addon_account_statement_import_sheet_file-18.0.1.0.0.4.dist-info}/METADATA +10 -12
- {odoo_addon_account_statement_import_sheet_file-17.0.1.1.2.dist-info → odoo_addon_account_statement_import_sheet_file-18.0.1.0.0.4.dist-info}/RECORD +14 -14
- {odoo_addon_account_statement_import_sheet_file-17.0.1.1.2.dist-info → odoo_addon_account_statement_import_sheet_file-18.0.1.0.0.4.dist-info}/WHEEL +0 -0
- {odoo_addon_account_statement_import_sheet_file-17.0.1.1.2.dist-info → odoo_addon_account_statement_import_sheet_file-18.0.1.0.0.4.dist-info}/top_level.txt +0 -0
|
@@ -11,7 +11,7 @@ Bank Statement TXT/CSV/XLSX Import
|
|
|
11
11
|
!! This file is generated by oca-gen-addon-readme !!
|
|
12
12
|
!! changes will be overwritten. !!
|
|
13
13
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
|
-
!! source digest: sha256:
|
|
14
|
+
!! source digest: sha256:7f262d73d39b721a7fe36fc8279b95fed86757391be9ea917e3f13ee9f4cd83f
|
|
15
15
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
16
16
|
|
|
17
17
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -21,13 +21,13 @@ Bank Statement TXT/CSV/XLSX Import
|
|
|
21
21
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
22
22
|
:alt: License: AGPL-3
|
|
23
23
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github
|
|
24
|
-
:target: https://github.com/OCA/bank-statement-import/tree/
|
|
24
|
+
:target: https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_sheet_file
|
|
25
25
|
:alt: OCA/bank-statement-import
|
|
26
26
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
27
|
-
:target: https://translation.odoo-community.org/projects/bank-statement-import-
|
|
27
|
+
:target: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_sheet_file
|
|
28
28
|
:alt: Translate me on Weblate
|
|
29
29
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
30
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=
|
|
30
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=18.0
|
|
31
31
|
:alt: Try me on Runboat
|
|
32
32
|
|
|
33
33
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
@@ -76,7 +76,7 @@ Bug Tracker
|
|
|
76
76
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-import/issues>`_.
|
|
77
77
|
In case of trouble, please check there if your issue has already been reported.
|
|
78
78
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
79
|
-
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_sheet_file%0Aversion:%
|
|
79
|
+
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_sheet_file%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
80
80
|
|
|
81
81
|
Do not contact contributors directly about support or help with technical issues.
|
|
82
82
|
|
|
@@ -133,6 +133,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
|
|
133
133
|
|
|
134
134
|
|maintainer-alexey-pelykh|
|
|
135
135
|
|
|
136
|
-
This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/
|
|
136
|
+
This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_sheet_file>`_ project on GitHub.
|
|
137
137
|
|
|
138
138
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Copyright 2019 ForgeFlow, S.L.
|
|
2
2
|
# Copyright 2020 CorporateHub (https://corporatehub.eu)
|
|
3
|
+
# Copyright 2025 Tecnativa - Pedro M. Baeza
|
|
3
4
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
4
5
|
|
|
5
6
|
{
|
|
6
7
|
"name": "Bank Statement TXT/CSV/XLSX Import",
|
|
7
8
|
"summary": "Import TXT/CSV or XLSX files as Bank Statements in Odoo",
|
|
8
|
-
"version": "
|
|
9
|
+
"version": "18.0.1.0.0",
|
|
9
10
|
"category": "Accounting",
|
|
10
11
|
"website": "https://github.com/OCA/bank-statement-import",
|
|
11
12
|
"author": "ForgeFlow, CorporateHub, Odoo Community Association (OCA)",
|
|
@@ -15,7 +16,6 @@
|
|
|
15
16
|
"depends": [
|
|
16
17
|
"account_statement_import_file",
|
|
17
18
|
],
|
|
18
|
-
"external_dependencies": {"python": ["xlrd", "chardet"]},
|
|
19
19
|
"data": [
|
|
20
20
|
"security/ir.model.access.csv",
|
|
21
21
|
"data/map_data.xml",
|
odoo/addons/account_statement_import_sheet_file/i18n/account_statement_import_sheet_file.pot
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
msgid ""
|
|
6
6
|
msgstr ""
|
|
7
|
-
"Project-Id-Version: Odoo Server
|
|
7
|
+
"Project-Id-Version: Odoo Server 18.0\n"
|
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
|
9
9
|
"Last-Translator: \n"
|
|
10
10
|
"Language-Team: \n"
|
|
@@ -16,23 +16,23 @@ msgstr ""
|
|
|
16
16
|
#. module: account_statement_import_sheet_file
|
|
17
17
|
#. odoo-python
|
|
18
18
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py:0
|
|
19
|
-
#, python-format
|
|
20
19
|
msgid "%(code)s: %(filename)s"
|
|
21
20
|
msgstr ""
|
|
22
21
|
|
|
23
22
|
#. module: account_statement_import_sheet_file
|
|
24
23
|
#: model_terms:ir.ui.view,arch_db:account_statement_import_sheet_file.account_statement_import_sheet_mapping_tree
|
|
25
24
|
msgid ""
|
|
26
|
-
"<span class=\"fa fa-info-circle\"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
25
|
+
"<span class=\"fa fa-info-circle\">\n"
|
|
26
|
+
" Add the column names or column number (when the file has no header). You can concatenate multiple columns in the file into the same field, indicating the column names or numbers separated by comma.\n"
|
|
27
|
+
" </span>"
|
|
29
28
|
msgstr ""
|
|
30
29
|
|
|
31
30
|
#. module: account_statement_import_sheet_file
|
|
32
31
|
#: model_terms:ir.ui.view,arch_db:account_statement_import_sheet_file.account_statement_import_sheet_mapping_tree
|
|
33
32
|
msgid ""
|
|
34
|
-
"<span class=\"fa fa-info-circle\"
|
|
35
|
-
"Columns section. The first column is 0
|
|
33
|
+
"<span class=\"fa fa-info-circle\">\n"
|
|
34
|
+
" indicate the column number in the Columns section. The first column is 0.\n"
|
|
35
|
+
" </span>"
|
|
36
36
|
msgstr ""
|
|
37
37
|
|
|
38
38
|
#. module: account_statement_import_sheet_file
|
|
@@ -43,7 +43,6 @@ msgstr ""
|
|
|
43
43
|
#. module: account_statement_import_sheet_file
|
|
44
44
|
#. odoo-python
|
|
45
45
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py:0
|
|
46
|
-
#, python-format
|
|
47
46
|
msgid "Account: %s; "
|
|
48
47
|
msgstr ""
|
|
49
48
|
|
|
@@ -65,7 +64,6 @@ msgstr ""
|
|
|
65
64
|
#. module: account_statement_import_sheet_file
|
|
66
65
|
#. odoo-python
|
|
67
66
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import.py:0
|
|
68
|
-
#, python-format
|
|
69
67
|
msgid "Bad file/mapping: "
|
|
70
68
|
msgstr ""
|
|
71
69
|
|
|
@@ -107,7 +105,6 @@ msgstr ""
|
|
|
107
105
|
#. module: account_statement_import_sheet_file
|
|
108
106
|
#. odoo-python
|
|
109
107
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py:0
|
|
110
|
-
#, python-format
|
|
111
108
|
msgid "Bank: %s; "
|
|
112
109
|
msgstr ""
|
|
113
110
|
|
|
@@ -316,7 +313,6 @@ msgstr ""
|
|
|
316
313
|
#. odoo-python
|
|
317
314
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py:0
|
|
318
315
|
#: model:ir.model.fields.selection,name:account_statement_import_sheet_file.selection__account_statement_import_sheet_mapping__delimiter__n/a
|
|
319
|
-
#, python-format
|
|
320
316
|
msgid "N/A"
|
|
321
317
|
msgstr ""
|
|
322
318
|
|
|
@@ -328,7 +324,6 @@ msgstr ""
|
|
|
328
324
|
#. module: account_statement_import_sheet_file
|
|
329
325
|
#. odoo-python
|
|
330
326
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py:0
|
|
331
|
-
#, python-format
|
|
332
327
|
msgid "No valid encoding was found for the attached file"
|
|
333
328
|
msgstr ""
|
|
334
329
|
|
|
@@ -345,7 +340,6 @@ msgstr ""
|
|
|
345
340
|
#. module: account_statement_import_sheet_file
|
|
346
341
|
#. odoo-python
|
|
347
342
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py:0
|
|
348
|
-
#, python-format
|
|
349
343
|
msgid "Offsets cannot be negative"
|
|
350
344
|
msgstr ""
|
|
351
345
|
|
|
@@ -459,7 +453,6 @@ msgstr ""
|
|
|
459
453
|
#. module: account_statement_import_sheet_file
|
|
460
454
|
#. odoo-python
|
|
461
455
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py:0
|
|
462
|
-
#, python-format
|
|
463
456
|
msgid "Transaction ID: %s; "
|
|
464
457
|
msgstr ""
|
|
465
458
|
|
|
@@ -496,14 +489,12 @@ msgstr ""
|
|
|
496
489
|
#. module: account_statement_import_sheet_file
|
|
497
490
|
#. odoo-python
|
|
498
491
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py:0
|
|
499
|
-
#, python-format
|
|
500
492
|
msgid "Use amount_column if you have set Amount type = 'Single value'"
|
|
501
493
|
msgstr ""
|
|
502
494
|
|
|
503
495
|
#. module: account_statement_import_sheet_file
|
|
504
496
|
#. odoo-python
|
|
505
497
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py:0
|
|
506
|
-
#, python-format
|
|
507
498
|
msgid ""
|
|
508
499
|
"Use amount_debit_column and amount_credit_column if you have set Amount type"
|
|
509
500
|
" = 'Distinct Credit/debit Column'"
|
|
@@ -512,7 +503,6 @@ msgstr ""
|
|
|
512
503
|
#. module: account_statement_import_sheet_file
|
|
513
504
|
#. odoo-python
|
|
514
505
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py:0
|
|
515
|
-
#, python-format
|
|
516
506
|
msgid "Use debit_credit_column if you have set Amount type = 'Absolute value'"
|
|
517
507
|
msgstr ""
|
|
518
508
|
|
|
@@ -6,15 +6,15 @@ msgid ""
|
|
|
6
6
|
msgstr ""
|
|
7
7
|
"Project-Id-Version: Odoo Server 16.0\n"
|
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
|
9
|
-
"PO-Revision-Date:
|
|
10
|
-
"Last-Translator:
|
|
9
|
+
"PO-Revision-Date: 2026-01-15 14:25+0000\n"
|
|
10
|
+
"Last-Translator: Betül Öğmen <betulo@eska.biz>\n"
|
|
11
11
|
"Language-Team: none\n"
|
|
12
12
|
"Language: tr\n"
|
|
13
13
|
"MIME-Version: 1.0\n"
|
|
14
14
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
15
15
|
"Content-Transfer-Encoding: \n"
|
|
16
16
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
|
17
|
-
"X-Generator: Weblate 4
|
|
17
|
+
"X-Generator: Weblate 5.10.4\n"
|
|
18
18
|
|
|
19
19
|
#. module: account_statement_import_sheet_file
|
|
20
20
|
#. odoo-python
|
|
@@ -63,7 +63,7 @@ msgstr "Hesap: %s; "
|
|
|
63
63
|
#. module: account_statement_import_sheet_file
|
|
64
64
|
#: model:ir.model.fields,help:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__skip_empty_lines
|
|
65
65
|
msgid "Allows to skip empty lines"
|
|
66
|
-
msgstr ""
|
|
66
|
+
msgstr "Boş satırları atlamaya izin verir"
|
|
67
67
|
|
|
68
68
|
#. module: account_statement_import_sheet_file
|
|
69
69
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__amount_column
|
|
@@ -137,7 +137,7 @@ msgstr "Sütunlar"
|
|
|
137
137
|
#. module: account_statement_import_sheet_file
|
|
138
138
|
#: model:ir.model.fields,help:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__offset_column
|
|
139
139
|
msgid "Columns to ignore before starting to parse"
|
|
140
|
-
msgstr ""
|
|
140
|
+
msgstr "Ayrıştırmaya başlamadan önce göz ardı edilecek sütunlar"
|
|
141
141
|
|
|
142
142
|
#. module: account_statement_import_sheet_file
|
|
143
143
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__create_uid
|
|
@@ -341,7 +341,7 @@ msgstr "Son Güncelleme"
|
|
|
341
341
|
#: model:ir.model.fields.selection,name:account_statement_import_sheet_file.selection__account_statement_import_sheet_mapping__delimiter__n/a
|
|
342
342
|
#, python-format
|
|
343
343
|
msgid "N/A"
|
|
344
|
-
msgstr ""
|
|
344
|
+
msgstr "Yok"
|
|
345
345
|
|
|
346
346
|
#. module: account_statement_import_sheet_file
|
|
347
347
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__name
|
|
@@ -363,14 +363,14 @@ msgstr "Not Sütunu"
|
|
|
363
363
|
#. module: account_statement_import_sheet_file
|
|
364
364
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__offset_column
|
|
365
365
|
msgid "Offset Column"
|
|
366
|
-
msgstr ""
|
|
366
|
+
msgstr "Ofset Sütunu"
|
|
367
367
|
|
|
368
368
|
#. module: account_statement_import_sheet_file
|
|
369
369
|
#. odoo-python
|
|
370
370
|
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py:0
|
|
371
371
|
#, python-format
|
|
372
372
|
msgid "Offsets cannot be negative"
|
|
373
|
-
msgstr ""
|
|
373
|
+
msgstr "Ofset negatif olamaz"
|
|
374
374
|
|
|
375
375
|
#. module: account_statement_import_sheet_file
|
|
376
376
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__original_amount_column
|
|
@@ -442,7 +442,7 @@ msgstr ""
|
|
|
442
442
|
#. module: account_statement_import_sheet_file
|
|
443
443
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__skip_empty_lines
|
|
444
444
|
msgid "Skip Empty Lines"
|
|
445
|
-
msgstr ""
|
|
445
|
+
msgstr "Boş Satırları Atla"
|
|
446
446
|
|
|
447
447
|
#. module: account_statement_import_sheet_file
|
|
448
448
|
#: model_terms:ir.ui.view,arch_db:account_statement_import_sheet_file.view_account_journal_form_n43
|
|
@@ -623,7 +623,7 @@ msgstr "Hiçbiri"
|
|
|
623
623
|
#. module: account_statement_import_sheet_file
|
|
624
624
|
#: model:ir.model.fields.selection,name:account_statement_import_sheet_file.selection__account_statement_import_sheet_mapping__float_thousands_sep__quote
|
|
625
625
|
msgid "quote (')"
|
|
626
|
-
msgstr ""
|
|
626
|
+
msgstr "alıntı (')"
|
|
627
627
|
|
|
628
628
|
#. module: account_statement_import_sheet_file
|
|
629
629
|
#: model:ir.model.fields.selection,name:account_statement_import_sheet_file.selection__account_statement_import_sheet_mapping__delimiter__semicolon
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import logging
|
|
5
5
|
|
|
6
|
-
from odoo import
|
|
6
|
+
from odoo import fields, models
|
|
7
7
|
from odoo.exceptions import UserError
|
|
8
8
|
|
|
9
9
|
_logger = logging.getLogger(__name__)
|
|
@@ -37,7 +37,7 @@ class AccountStatementImport(models.TransientModel):
|
|
|
37
37
|
if self.env.context.get("account_statement_import_sheet_file_test"):
|
|
38
38
|
raise
|
|
39
39
|
_logger.warning("Sheet parser error", exc_info=True)
|
|
40
|
-
raise UserError(_("Bad file/mapping: ") + str(exc)) from exc
|
|
40
|
+
raise UserError(self.env._("Bad file/mapping: ") + str(exc)) from exc
|
|
41
41
|
return super()._parse_file(data_file)
|
|
42
42
|
|
|
43
43
|
def _create_bank_statements(self, stmts_vals, result):
|
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Copyright 2020 CorporateHub (https://corporatehub.eu)
|
|
3
3
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
4
4
|
|
|
5
|
-
from odoo import
|
|
5
|
+
from odoo import api, fields, models
|
|
6
6
|
from odoo.exceptions import ValidationError
|
|
7
7
|
|
|
8
8
|
|
|
@@ -194,11 +194,13 @@ class AccountStatementImportSheetMapping(models.Model):
|
|
|
194
194
|
for item in self:
|
|
195
195
|
if item.amount_type == "simple_value" and not item.amount_column:
|
|
196
196
|
raise ValidationError(
|
|
197
|
-
_(
|
|
197
|
+
self.env._(
|
|
198
|
+
"Use amount_column if you have set Amount type = 'Single value'"
|
|
199
|
+
)
|
|
198
200
|
)
|
|
199
201
|
elif item.amount_type == "absolute_value" and not item.debit_credit_column:
|
|
200
202
|
raise ValidationError(
|
|
201
|
-
_(
|
|
203
|
+
self.env._(
|
|
202
204
|
"Use debit_credit_column if you have set "
|
|
203
205
|
"Amount type = 'Absolute value'"
|
|
204
206
|
)
|
|
@@ -207,7 +209,7 @@ class AccountStatementImportSheetMapping(models.Model):
|
|
|
207
209
|
not item.amount_debit_column or not item.amount_credit_column
|
|
208
210
|
):
|
|
209
211
|
raise ValidationError(
|
|
210
|
-
_(
|
|
212
|
+
self.env._(
|
|
211
213
|
"Use amount_debit_column and amount_credit_column if you "
|
|
212
214
|
"have set Amount type = 'Distinct Credit/debit Column'"
|
|
213
215
|
)
|
|
@@ -231,7 +233,7 @@ class AccountStatementImportSheetMapping(models.Model):
|
|
|
231
233
|
def _check_columns(self):
|
|
232
234
|
for mapping in self:
|
|
233
235
|
if mapping.offset_column < 0:
|
|
234
|
-
raise ValidationError(_("Offsets cannot be negative"))
|
|
236
|
+
raise ValidationError(self.env._("Offsets cannot be negative"))
|
|
235
237
|
|
|
236
238
|
def _get_float_separators(self):
|
|
237
239
|
self.ensure_one()
|
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py
CHANGED
|
@@ -12,7 +12,7 @@ from decimal import Decimal
|
|
|
12
12
|
from io import StringIO
|
|
13
13
|
from os import path
|
|
14
14
|
|
|
15
|
-
from odoo import
|
|
15
|
+
from odoo import api, models
|
|
16
16
|
from odoo.exceptions import UserError
|
|
17
17
|
|
|
18
18
|
_logger = logging.getLogger(__name__)
|
|
@@ -72,11 +72,11 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
72
72
|
last_line = lines[-1]
|
|
73
73
|
data = {
|
|
74
74
|
"date": first_line["timestamp"].date(),
|
|
75
|
-
"name": _(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
"name": self.env._(
|
|
76
|
+
"%(code)s: %(filename)s",
|
|
77
|
+
code=journal.code,
|
|
78
|
+
filename=path.basename(filename),
|
|
79
|
+
),
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
if mapping.balance_column:
|
|
@@ -173,7 +173,7 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
173
173
|
detected_encoding = chardet.detect(data_file).get("encoding", False)
|
|
174
174
|
if not detected_encoding:
|
|
175
175
|
raise UserError(
|
|
176
|
-
_("No valid encoding was found for the attached file")
|
|
176
|
+
self.env._("No valid encoding was found for the attached file")
|
|
177
177
|
) from None
|
|
178
178
|
decoded_file = data_file.decode(detected_encoding)
|
|
179
179
|
csv_or_xlsx = reader(StringIO(decoded_file), **csv_options)
|
|
@@ -446,22 +446,21 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
446
446
|
transaction["currency_id"] = currency.id
|
|
447
447
|
|
|
448
448
|
if transaction_id:
|
|
449
|
-
transaction["unique_import_id"] =
|
|
450
|
-
transaction_id
|
|
451
|
-
int(timestamp.timestamp()),
|
|
449
|
+
transaction["unique_import_id"] = (
|
|
450
|
+
f"{transaction_id}-{int(timestamp.timestamp())}"
|
|
452
451
|
)
|
|
453
452
|
|
|
454
|
-
transaction["payment_ref"] = description or _("N/A")
|
|
453
|
+
transaction["payment_ref"] = description or self.env._("N/A")
|
|
455
454
|
if reference:
|
|
456
455
|
transaction["ref"] = reference
|
|
457
456
|
|
|
458
457
|
note = ""
|
|
459
458
|
if bank_name:
|
|
460
|
-
note += _("Bank: %s; ") % (bank_name,)
|
|
459
|
+
note += self.env._("Bank: %s; ") % (bank_name,)
|
|
461
460
|
if bank_account:
|
|
462
|
-
note += _("Account: %s; ") % (bank_account,)
|
|
461
|
+
note += self.env._("Account: %s; ") % (bank_account,)
|
|
463
462
|
if transaction_id:
|
|
464
|
-
note += _("Transaction ID: %s; ") % (transaction_id,)
|
|
463
|
+
note += self.env._("Transaction ID: %s; ") % (transaction_id,)
|
|
465
464
|
if note and notes:
|
|
466
465
|
note = f"{notes}\n{note.strip()}"
|
|
467
466
|
elif note:
|
|
@@ -372,9 +372,9 @@ ul.auto-toc {
|
|
|
372
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
373
373
|
!! changes will be overwritten. !!
|
|
374
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:7f262d73d39b721a7fe36fc8279b95fed86757391be9ea917e3f13ee9f4cd83f
|
|
376
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
|
-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-statement-import/tree/
|
|
377
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_sheet_file"><img alt="OCA/bank-statement-import" src="https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_sheet_file"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
378
|
<p>This module allows you to import any TXT/CSV or XLSX file in Odoo as
|
|
379
379
|
bank statements.</p>
|
|
380
380
|
<p><strong>Table of contents</strong></p>
|
|
@@ -431,7 +431,7 @@ format</li>
|
|
|
431
431
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-statement-import/issues">GitHub Issues</a>.
|
|
432
432
|
In case of trouble, please check there if your issue has already been reported.
|
|
433
433
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
434
|
-
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_sheet_file%0Aversion:%
|
|
434
|
+
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_sheet_file%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
435
435
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
436
436
|
</div>
|
|
437
437
|
<div class="section" id="credits">
|
|
@@ -478,7 +478,7 @@ mission is to support the collaborative development of Odoo features and
|
|
|
478
478
|
promote its widespread use.</p>
|
|
479
479
|
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
|
480
480
|
<p><a class="reference external image-reference" href="https://github.com/alexey-pelykh"><img alt="alexey-pelykh" src="https://github.com/alexey-pelykh.png?size=40px" /></a></p>
|
|
481
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/
|
|
481
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_sheet_file">OCA/bank-statement-import</a> project on GitHub.</p>
|
|
482
482
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
483
483
|
</div>
|
|
484
484
|
</div>
|