odoo-addon-account-statement-import-sheet-file 17.0.1.0.0.6__py3-none-any.whl → 17.0.1.1.0__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 +19 -17
- odoo/addons/account_statement_import_sheet_file/__manifest__.py +1 -1
- odoo/addons/account_statement_import_sheet_file/i18n/account_statement_import_sheet_file.pot +27 -0
- odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py +14 -0
- odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py +9 -3
- odoo/addons/account_statement_import_sheet_file/readme/CONTRIBUTORS.md +1 -0
- odoo/addons/account_statement_import_sheet_file/static/description/index.html +9 -5
- odoo/addons/account_statement_import_sheet_file/tests/fixtures/empty_lines_statement.csv +5 -0
- odoo/addons/account_statement_import_sheet_file/tests/fixtures/sample_statement_offsets.xlsx +0 -0
- odoo/addons/account_statement_import_sheet_file/tests/test_account_statement_import_sheet_file.py +91 -0
- odoo/addons/account_statement_import_sheet_file/views/account_statement_import_sheet_mapping.xml +2 -0
- {odoo_addon_account_statement_import_sheet_file-17.0.1.0.0.6.dist-info → odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info}/METADATA +20 -18
- {odoo_addon_account_statement_import_sheet_file-17.0.1.0.0.6.dist-info → odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info}/RECORD +15 -13
- {odoo_addon_account_statement_import_sheet_file-17.0.1.0.0.6.dist-info → odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info}/WHEEL +1 -1
- {odoo_addon_account_statement_import_sheet_file-17.0.1.0.0.6.dist-info → odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ Bank Statement TXT/CSV/XLSX Import
|
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
8
|
!! changes will be overwritten. !!
|
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
10
|
+
!! source digest: sha256:152e396ff6868978b165509c50726b88efd20d31f40c58c6c7a59384e8df4fbf
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -61,10 +61,10 @@ Changelog
|
|
|
61
61
|
12.0.2.0.0
|
|
62
62
|
----------
|
|
63
63
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
64
|
+
- [BREAKING] New mapping, please review mappings after upgrade.
|
|
65
|
+
- [BREAKING] Different bank accounts have to be used per each currency.
|
|
66
|
+
- [ADD] Support for both Statement and Activity reports.
|
|
67
|
+
- [ADD] Separate fee and currency exchange parsing.
|
|
68
68
|
|
|
69
69
|
Bug Tracker
|
|
70
70
|
===========
|
|
@@ -88,23 +88,25 @@ Authors
|
|
|
88
88
|
Contributors
|
|
89
89
|
------------
|
|
90
90
|
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
91
|
+
- Alexis de Lattre <alexis.delattre@akretion.com>
|
|
92
|
+
- Sebastien BEAU <sebastien.beau@akretion.com>
|
|
93
|
+
- Katherine Zaoral
|
|
94
|
+
- Tecnativa (https://www.tecnativa.com)
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
- Vicent Cubells
|
|
97
|
+
- Victor M.M. Torres
|
|
98
|
+
- Víctor Martínez
|
|
99
99
|
|
|
100
|
-
-
|
|
100
|
+
- ForgeFlow (https://www.forgeflow.com)
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
- Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
|
|
103
|
+
- Miquel Raïch Regué <miquel.raich@forgeflow.com>
|
|
104
104
|
|
|
105
|
-
-
|
|
105
|
+
- `CorporateHub <https://corporatehub.eu/>`__
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
- Alexey Pelykh <alexey.pelykh@corphub.eu>
|
|
108
|
+
|
|
109
|
+
- Sebastiano Picchi sebastiano.picchi@pytech.it
|
|
108
110
|
|
|
109
111
|
Maintainers
|
|
110
112
|
-----------
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
{
|
|
6
6
|
"name": "Bank Statement TXT/CSV/XLSX Import",
|
|
7
7
|
"summary": "Import TXT/CSV or XLSX files as Bank Statements in Odoo",
|
|
8
|
-
"version": "17.0.1.
|
|
8
|
+
"version": "17.0.1.1.0",
|
|
9
9
|
"category": "Accounting",
|
|
10
10
|
"website": "https://github.com/OCA/bank-statement-import",
|
|
11
11
|
"author": "ForgeFlow, CorporateHub, Odoo Community Association (OCA)",
|
odoo/addons/account_statement_import_sheet_file/i18n/account_statement_import_sheet_file.pot
CHANGED
|
@@ -47,6 +47,11 @@ msgstr ""
|
|
|
47
47
|
msgid "Account: %s; "
|
|
48
48
|
msgstr ""
|
|
49
49
|
|
|
50
|
+
#. module: account_statement_import_sheet_file
|
|
51
|
+
#: model:ir.model.fields,help:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__skip_empty_lines
|
|
52
|
+
msgid "Allows to skip empty lines"
|
|
53
|
+
msgstr ""
|
|
54
|
+
|
|
50
55
|
#. module: account_statement_import_sheet_file
|
|
51
56
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__amount_column
|
|
52
57
|
msgid "Amount column"
|
|
@@ -116,6 +121,11 @@ msgstr ""
|
|
|
116
121
|
msgid "Columns"
|
|
117
122
|
msgstr ""
|
|
118
123
|
|
|
124
|
+
#. module: account_statement_import_sheet_file
|
|
125
|
+
#: model:ir.model.fields,help:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__offset_column
|
|
126
|
+
msgid "Columns to ignore before starting to parse"
|
|
127
|
+
msgstr ""
|
|
128
|
+
|
|
119
129
|
#. module: account_statement_import_sheet_file
|
|
120
130
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__create_uid
|
|
121
131
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_parser__create_uid
|
|
@@ -327,6 +337,18 @@ msgstr ""
|
|
|
327
337
|
msgid "Notes Column"
|
|
328
338
|
msgstr ""
|
|
329
339
|
|
|
340
|
+
#. module: account_statement_import_sheet_file
|
|
341
|
+
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__offset_column
|
|
342
|
+
msgid "Offset Column"
|
|
343
|
+
msgstr ""
|
|
344
|
+
|
|
345
|
+
#. module: account_statement_import_sheet_file
|
|
346
|
+
#. odoo-python
|
|
347
|
+
#: code:addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py:0
|
|
348
|
+
#, python-format
|
|
349
|
+
msgid "Offsets cannot be negative"
|
|
350
|
+
msgstr ""
|
|
351
|
+
|
|
330
352
|
#. module: account_statement_import_sheet_file
|
|
331
353
|
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__original_amount_column
|
|
332
354
|
msgid "Original Amount Column"
|
|
@@ -388,6 +410,11 @@ msgid ""
|
|
|
388
410
|
"Distinct Credit/debit Column: use a distinct column for debit and credit"
|
|
389
411
|
msgstr ""
|
|
390
412
|
|
|
413
|
+
#. module: account_statement_import_sheet_file
|
|
414
|
+
#: model:ir.model.fields,field_description:account_statement_import_sheet_file.field_account_statement_import_sheet_mapping__skip_empty_lines
|
|
415
|
+
msgid "Skip Empty Lines"
|
|
416
|
+
msgstr ""
|
|
417
|
+
|
|
391
418
|
#. module: account_statement_import_sheet_file
|
|
392
419
|
#: model_terms:ir.ui.view,arch_db:account_statement_import_sheet_file.view_account_journal_form_n43
|
|
393
420
|
msgid "Statement Import Map"
|
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py
CHANGED
|
@@ -174,6 +174,14 @@ class AccountStatementImportSheetMapping(models.Model):
|
|
|
174
174
|
help="Set the Header lines number.",
|
|
175
175
|
default="0",
|
|
176
176
|
)
|
|
177
|
+
skip_empty_lines = fields.Boolean(
|
|
178
|
+
default=True,
|
|
179
|
+
help="Allows to skip empty lines",
|
|
180
|
+
)
|
|
181
|
+
offset_column = fields.Integer(
|
|
182
|
+
default=0,
|
|
183
|
+
help="Columns to ignore before starting to parse",
|
|
184
|
+
)
|
|
177
185
|
|
|
178
186
|
@api.constrains(
|
|
179
187
|
"amount_type",
|
|
@@ -219,6 +227,12 @@ class AccountStatementImportSheetMapping(models.Model):
|
|
|
219
227
|
elif "comma" == self.float_thousands_sep == self.float_decimal_sep:
|
|
220
228
|
self.float_thousands_sep = "dot"
|
|
221
229
|
|
|
230
|
+
@api.constrains("offset_column")
|
|
231
|
+
def _check_columns(self):
|
|
232
|
+
for mapping in self:
|
|
233
|
+
if mapping.offset_column < 0:
|
|
234
|
+
raise ValidationError(_("Offsets cannot be negative"))
|
|
235
|
+
|
|
222
236
|
def _get_float_separators(self):
|
|
223
237
|
self.ensure_one()
|
|
224
238
|
separators = {
|
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py
CHANGED
|
@@ -188,6 +188,8 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
188
188
|
else:
|
|
189
189
|
[next(csv_or_xlsx) for _i in range(header_line)]
|
|
190
190
|
header = [value.strip() for value in next(csv_or_xlsx)]
|
|
191
|
+
if mapping.offset_column:
|
|
192
|
+
header = header[mapping.offset_column :]
|
|
191
193
|
|
|
192
194
|
# NOTE no seria necesario debit_column y credit_column ya que tenemos los
|
|
193
195
|
# respectivos campos related
|
|
@@ -226,7 +228,7 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
226
228
|
footer_line = numrows - mapping.footer_lines_skip_count
|
|
227
229
|
|
|
228
230
|
if isinstance(csv_or_xlsx, tuple):
|
|
229
|
-
rows = range(
|
|
231
|
+
rows = range(label_line, footer_line)
|
|
230
232
|
else:
|
|
231
233
|
rows = csv_or_xlsx
|
|
232
234
|
|
|
@@ -236,7 +238,7 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
236
238
|
book = csv_or_xlsx[0]
|
|
237
239
|
sheet = csv_or_xlsx[1]
|
|
238
240
|
values = []
|
|
239
|
-
for col_index in range(
|
|
241
|
+
for col_index in range(mapping.offset_column, sheet.row_len(row)):
|
|
240
242
|
cell_type = sheet.cell_type(row, col_index)
|
|
241
243
|
cell_value = sheet.cell_value(row, col_index)
|
|
242
244
|
if cell_type == xlrd.XL_CELL_DATE:
|
|
@@ -246,6 +248,8 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
246
248
|
if index >= footer_line:
|
|
247
249
|
continue
|
|
248
250
|
values = list(row)
|
|
251
|
+
if mapping.skip_empty_lines and not any(values):
|
|
252
|
+
continue
|
|
249
253
|
|
|
250
254
|
timestamp = self._get_values_from_column(
|
|
251
255
|
values, columns, "timestamp_column"
|
|
@@ -395,7 +399,9 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
|
|
395
399
|
line["bank_name"] = bank_name
|
|
396
400
|
if bank_account is not None:
|
|
397
401
|
line["bank_account"] = bank_account
|
|
398
|
-
|
|
402
|
+
|
|
403
|
+
if line:
|
|
404
|
+
lines.append(line)
|
|
399
405
|
return lines
|
|
400
406
|
|
|
401
407
|
@api.model
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
:Author: David Goodger (goodger@python.org)
|
|
11
|
-
:Id: $Id: html4css1.css
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
12
|
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
13
|
|
|
14
14
|
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
15
16
|
|
|
16
17
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
17
18
|
customize this style sheet.
|
|
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
|
274
275
|
margin-left: 2em ;
|
|
275
276
|
margin-right: 2em }
|
|
276
277
|
|
|
277
|
-
pre.code .ln { color:
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
278
279
|
pre.code, code { background-color: #eeeeee }
|
|
279
280
|
pre.code .comment, code .comment { color: #5C6576 }
|
|
280
281
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
@@ -300,7 +301,7 @@ span.option {
|
|
|
300
301
|
span.pre {
|
|
301
302
|
white-space: pre }
|
|
302
303
|
|
|
303
|
-
span.problematic {
|
|
304
|
+
span.problematic, pre.problematic {
|
|
304
305
|
color: red }
|
|
305
306
|
|
|
306
307
|
span.section-subtitle {
|
|
@@ -366,7 +367,7 @@ ul.auto-toc {
|
|
|
366
367
|
!! This file is generated by oca-gen-addon-readme !!
|
|
367
368
|
!! changes will be overwritten. !!
|
|
368
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
369
|
-
!! source digest: sha256:
|
|
370
|
+
!! source digest: sha256:152e396ff6868978b165509c50726b88efd20d31f40c58c6c7a59384e8df4fbf
|
|
370
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
371
372
|
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-statement-import/tree/17.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-17-0/bank-statement-import-17-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=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
372
373
|
<p>This module allows you to import any TXT/CSV or XLSX file in Odoo as
|
|
@@ -458,12 +459,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
458
459
|
<li>Alexey Pelykh <<a class="reference external" href="mailto:alexey.pelykh@corphub.eu">alexey.pelykh@corphub.eu</a>></li>
|
|
459
460
|
</ul>
|
|
460
461
|
</li>
|
|
462
|
+
<li>Sebastiano Picchi <a class="reference external" href="mailto:sebastiano.picchi@pytech.it">sebastiano.picchi@pytech.it</a></li>
|
|
461
463
|
</ul>
|
|
462
464
|
</div>
|
|
463
465
|
<div class="section" id="maintainers">
|
|
464
466
|
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
|
|
465
467
|
<p>This module is maintained by the OCA.</p>
|
|
466
|
-
<a class="reference external image-reference" href="https://odoo-community.org"
|
|
468
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
469
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
470
|
+
</a>
|
|
467
471
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
468
472
|
mission is to support the collaborative development of Odoo features and
|
|
469
473
|
promote its widespread use.</p>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"Date","Label","Currency","Amount","Amount Currency","Partner Name","Bank Account"
|
|
2
|
+
"02/25/2018","AAAOOO 1","EUR","-33.50","0.0","John Doe","123456789"
|
|
3
|
+
"02/26/2018","AAAOOO 2","EUR","1,525.00","1,000.00","Azure Interior",""
|
|
4
|
+
,,,,,,
|
|
5
|
+
"02/27/2018","AAAOOO 3","EUR","800.00","800.00","Azure Interior","123456789"
|
|
Binary file
|
odoo/addons/account_statement_import_sheet_file/tests/test_account_statement_import_sheet_file.py
CHANGED
|
@@ -678,3 +678,94 @@ class TestAccountStatementImportSheetFile(common.TransactionCase):
|
|
|
678
678
|
self.parser._parse_decimal(Decimal("1234.56"), self.mock_mapping_comma_dot),
|
|
679
679
|
1234.56,
|
|
680
680
|
)
|
|
681
|
+
|
|
682
|
+
def test_offsets(self):
|
|
683
|
+
journal = self.AccountJournal.create(
|
|
684
|
+
{
|
|
685
|
+
"name": "Bank",
|
|
686
|
+
"type": "bank",
|
|
687
|
+
"code": "BANK",
|
|
688
|
+
"currency_id": self.currency_usd.id,
|
|
689
|
+
"suspense_account_id": self.suspense_account.id,
|
|
690
|
+
}
|
|
691
|
+
)
|
|
692
|
+
file_name = "fixtures/sample_statement_offsets.xlsx"
|
|
693
|
+
data = self._data_file(file_name)
|
|
694
|
+
wizard = self.AccountStatementImport.with_context(journal_id=journal.id).create(
|
|
695
|
+
{
|
|
696
|
+
"statement_filename": file_name,
|
|
697
|
+
"statement_file": data,
|
|
698
|
+
"sheet_mapping_id": self.sample_statement_map.id,
|
|
699
|
+
}
|
|
700
|
+
)
|
|
701
|
+
with self.assertRaises(UserError):
|
|
702
|
+
wizard.with_context(
|
|
703
|
+
account_statement_import_txt_xlsx_test=True
|
|
704
|
+
).import_file_button()
|
|
705
|
+
statement_map_offsets = self.sample_statement_map.copy(
|
|
706
|
+
{
|
|
707
|
+
"offset_column": 1,
|
|
708
|
+
"header_lines_skip_count": 3,
|
|
709
|
+
}
|
|
710
|
+
)
|
|
711
|
+
wizard = self.AccountStatementImport.with_context(journal_id=journal.id).create(
|
|
712
|
+
{
|
|
713
|
+
"statement_filename": file_name,
|
|
714
|
+
"statement_file": data,
|
|
715
|
+
"sheet_mapping_id": statement_map_offsets.id,
|
|
716
|
+
}
|
|
717
|
+
)
|
|
718
|
+
wizard.with_context(
|
|
719
|
+
account_statement_import_txt_xlsx_test=True
|
|
720
|
+
).import_file_button()
|
|
721
|
+
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
|
722
|
+
self.assertEqual(len(statement), 1)
|
|
723
|
+
self.assertEqual(len(statement.line_ids), 2)
|
|
724
|
+
self.assertEqual(statement.balance_start, 0.0)
|
|
725
|
+
self.assertEqual(statement.balance_end_real, 1491.5)
|
|
726
|
+
self.assertEqual(statement.balance_end, 1491.5)
|
|
727
|
+
|
|
728
|
+
def test_skip_empty_lines(self):
|
|
729
|
+
journal = self.AccountJournal.create(
|
|
730
|
+
{
|
|
731
|
+
"name": "Bank",
|
|
732
|
+
"type": "bank",
|
|
733
|
+
"code": "BANK",
|
|
734
|
+
"currency_id": self.currency_usd.id,
|
|
735
|
+
"suspense_account_id": self.suspense_account.id,
|
|
736
|
+
}
|
|
737
|
+
)
|
|
738
|
+
file_name = "fixtures/empty_lines_statement.csv"
|
|
739
|
+
data = self._data_file(file_name, "utf-8")
|
|
740
|
+
statement_map_empty_line = self.sample_statement_map.copy(
|
|
741
|
+
{
|
|
742
|
+
"skip_empty_lines": False,
|
|
743
|
+
}
|
|
744
|
+
)
|
|
745
|
+
wizard = self.AccountStatementImport.with_context(journal_id=journal.id).create(
|
|
746
|
+
{
|
|
747
|
+
"statement_filename": file_name,
|
|
748
|
+
"statement_file": data,
|
|
749
|
+
"sheet_mapping_id": statement_map_empty_line.id,
|
|
750
|
+
}
|
|
751
|
+
)
|
|
752
|
+
with self.assertRaises(UserError):
|
|
753
|
+
wizard.with_context(
|
|
754
|
+
account_statement_import_txt_xlsx_test=True
|
|
755
|
+
).import_file_button()
|
|
756
|
+
wizard = self.AccountStatementImport.with_context(journal_id=journal.id).create(
|
|
757
|
+
{
|
|
758
|
+
"statement_filename": file_name,
|
|
759
|
+
"statement_file": data,
|
|
760
|
+
"sheet_mapping_id": self.sample_statement_map.id,
|
|
761
|
+
}
|
|
762
|
+
)
|
|
763
|
+
wizard.with_context(
|
|
764
|
+
account_statement_import_txt_xlsx_test=True
|
|
765
|
+
).import_file_button()
|
|
766
|
+
statement = self.AccountBankStatement.search([("journal_id", "=", journal.id)])
|
|
767
|
+
self.assertEqual(len(statement), 1)
|
|
768
|
+
self.assertEqual(len(statement.line_ids), 3)
|
|
769
|
+
self.assertEqual(statement.balance_start, 0.0)
|
|
770
|
+
self.assertEqual(statement.balance_end_real, 2291.5)
|
|
771
|
+
self.assertEqual(statement.balance_end, 2291.5)
|
odoo/addons/account_statement_import_sheet_file/views/account_statement_import_sheet_mapping.xml
CHANGED
|
@@ -56,8 +56,10 @@
|
|
|
56
56
|
<field name="credit_value" required="debit_credit_column" />
|
|
57
57
|
</group>
|
|
58
58
|
<group>
|
|
59
|
+
<field name="skip_empty_lines" />
|
|
59
60
|
<field name="header_lines_skip_count" />
|
|
60
61
|
<field name="footer_lines_skip_count" />
|
|
62
|
+
<field name="offset_column" invisible="no_header" />
|
|
61
63
|
</group>
|
|
62
64
|
</group>
|
|
63
65
|
<group string="Columns">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-account_statement_import_sheet_file
|
|
3
|
-
Version: 17.0.1.
|
|
3
|
+
Version: 17.0.1.1.0
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
5
|
Requires-Dist: chardet
|
|
6
6
|
Requires-Dist: odoo-addon-account_statement_import_file>=17.0dev,<17.1dev
|
|
@@ -25,7 +25,7 @@ Bank Statement TXT/CSV/XLSX Import
|
|
|
25
25
|
!! This file is generated by oca-gen-addon-readme !!
|
|
26
26
|
!! changes will be overwritten. !!
|
|
27
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
|
-
!! source digest: sha256:
|
|
28
|
+
!! source digest: sha256:152e396ff6868978b165509c50726b88efd20d31f40c58c6c7a59384e8df4fbf
|
|
29
29
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30
30
|
|
|
31
31
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -79,10 +79,10 @@ Changelog
|
|
|
79
79
|
12.0.2.0.0
|
|
80
80
|
----------
|
|
81
81
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
82
|
+
- [BREAKING] New mapping, please review mappings after upgrade.
|
|
83
|
+
- [BREAKING] Different bank accounts have to be used per each currency.
|
|
84
|
+
- [ADD] Support for both Statement and Activity reports.
|
|
85
|
+
- [ADD] Separate fee and currency exchange parsing.
|
|
86
86
|
|
|
87
87
|
Bug Tracker
|
|
88
88
|
===========
|
|
@@ -106,23 +106,25 @@ Authors
|
|
|
106
106
|
Contributors
|
|
107
107
|
------------
|
|
108
108
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
109
|
+
- Alexis de Lattre <alexis.delattre@akretion.com>
|
|
110
|
+
- Sebastien BEAU <sebastien.beau@akretion.com>
|
|
111
|
+
- Katherine Zaoral
|
|
112
|
+
- Tecnativa (https://www.tecnativa.com)
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
- Vicent Cubells
|
|
115
|
+
- Victor M.M. Torres
|
|
116
|
+
- Víctor Martínez
|
|
117
117
|
|
|
118
|
-
-
|
|
118
|
+
- ForgeFlow (https://www.forgeflow.com)
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
- Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
|
|
121
|
+
- Miquel Raïch Regué <miquel.raich@forgeflow.com>
|
|
122
122
|
|
|
123
|
-
-
|
|
123
|
+
- `CorporateHub <https://corporatehub.eu/>`__
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
- Alexey Pelykh <alexey.pelykh@corphub.eu>
|
|
126
|
+
|
|
127
|
+
- Sebastiano Picchi sebastiano.picchi@pytech.it
|
|
126
128
|
|
|
127
129
|
Maintainers
|
|
128
130
|
-----------
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
odoo/addons/account_statement_import_sheet_file/README.rst,sha256=
|
|
1
|
+
odoo/addons/account_statement_import_sheet_file/README.rst,sha256=k0H6MFKwBQ7tKqzKFQ7TV0aAXR0Lj9KXGbnG5gL38uk,4559
|
|
2
2
|
odoo/addons/account_statement_import_sheet_file/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
-
odoo/addons/account_statement_import_sheet_file/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/account_statement_import_sheet_file/__manifest__.py,sha256=QXs_2Nd-yBGzGehqq8vZ9MVzcIg7QwVOmL9q8cLhSFc,934
|
|
4
4
|
odoo/addons/account_statement_import_sheet_file/data/map_data.xml,sha256=nz_4CchVMF9pb_SI4I6UZAt2IBPxWapX37lU6J6sTJ0,1225
|
|
5
|
-
odoo/addons/account_statement_import_sheet_file/i18n/account_statement_import_sheet_file.pot,sha256=
|
|
5
|
+
odoo/addons/account_statement_import_sheet_file/i18n/account_statement_import_sheet_file.pot,sha256=0bOWoJHO8rwi8ouPB7ui-M2O7Ht80-pXCZkJTq3k2Tg,27191
|
|
6
6
|
odoo/addons/account_statement_import_sheet_file/i18n/es.po,sha256=yOvuJ4Yc0akWC6-F0jphasxecuO-ggVr9H3-CVVPalw,31118
|
|
7
7
|
odoo/addons/account_statement_import_sheet_file/i18n/es_AR.po,sha256=Dt3K_wzmPDJXLusYxt-7lOuU30gyhuq43sJZomRmyA4,29854
|
|
8
8
|
odoo/addons/account_statement_import_sheet_file/i18n/it.po,sha256=3zcyQB7m0prhq5kPEXbqxsND_ooivu0q64IFdqwAQ7s,31047
|
|
@@ -13,21 +13,22 @@ odoo/addons/account_statement_import_sheet_file/i18n/zh_CN.po,sha256=C1Fw-YuAkdc
|
|
|
13
13
|
odoo/addons/account_statement_import_sheet_file/models/__init__.py,sha256=RsEvd89lQS7V0Mlk6D6FAWyOMDRd8YD0d9i4Xc-XcDo,240
|
|
14
14
|
odoo/addons/account_statement_import_sheet_file/models/account_journal.py,sha256=F4_deAvNErZ6o1gkw9uhDrEnHyWXUKNvk09mzCVzTIw,562
|
|
15
15
|
odoo/addons/account_statement_import_sheet_file/models/account_statement_import.py,sha256=KWDYgO9-C1ZAF7JO9Qlq2ghROcJIwKhGp1CueTnA368,1932
|
|
16
|
-
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py,sha256=
|
|
17
|
-
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py,sha256=
|
|
16
|
+
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_mapping.py,sha256=HDR7tcbzw-I6h_hKRNpCFTDiHvOtfgHeAgoFV-Fg_yY,9308
|
|
17
|
+
odoo/addons/account_statement_import_sheet_file/models/account_statement_import_sheet_parser.py,sha256=aHMiiWiN6QTLE_pFhnmjrYRZBUXI0qBlpuoUY80Sl7U,18332
|
|
18
18
|
odoo/addons/account_statement_import_sheet_file/readme/CONFIGURE.md,sha256=1Z-fR-OJrU8oshmBIcFA3yBd4evqZSgfqezqPRs8RpY,226
|
|
19
|
-
odoo/addons/account_statement_import_sheet_file/readme/CONTRIBUTORS.md,sha256=
|
|
19
|
+
odoo/addons/account_statement_import_sheet_file/readme/CONTRIBUTORS.md,sha256=Xuy8w1BQ1Nh6eVxGLjqVWXlzIMK7EAGf3whVsycey_Q,535
|
|
20
20
|
odoo/addons/account_statement_import_sheet_file/readme/DESCRIPTION.md,sha256=VFlOJ-nljwNW6S9uaZVNb_x6Gw1P0FLr6gHcV2-dHk4,86
|
|
21
21
|
odoo/addons/account_statement_import_sheet_file/readme/HISTORY.md,sha256=7y-Qd00CnGzaFNX1N4w-TiCAzeubOmsKDXQ-otIfjFQ,270
|
|
22
22
|
odoo/addons/account_statement_import_sheet_file/readme/USAGE.md,sha256=KcCNrSS7xVkRrpqfoZoL6VVkysu1dpOgRRNTfn2QH0c,190
|
|
23
23
|
odoo/addons/account_statement_import_sheet_file/security/ir.model.access.csv,sha256=ofB5jVirJJ3FQ-uWfKFD-DIg8Lh9bYLaUDQWnb9MkgM,685
|
|
24
24
|
odoo/addons/account_statement_import_sheet_file/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
25
|
-
odoo/addons/account_statement_import_sheet_file/static/description/index.html,sha256=
|
|
25
|
+
odoo/addons/account_statement_import_sheet_file/static/description/index.html,sha256=WlRlq-ywWXpstlcjtSprdESjORsK9ly7e8I6CKmN5kE,15507
|
|
26
26
|
odoo/addons/account_statement_import_sheet_file/tests/__init__.py,sha256=f7vTpmONnfbbcMp5wZ1p7muSkyLC2vcDONaw2VGyiBw,121
|
|
27
|
-
odoo/addons/account_statement_import_sheet_file/tests/test_account_statement_import_sheet_file.py,sha256=
|
|
27
|
+
odoo/addons/account_statement_import_sheet_file/tests/test_account_statement_import_sheet_file.py,sha256=qLDrS6cmMQZnh1yKkuhToFD1vKXr19s33Rb-TDKPRUY,31320
|
|
28
28
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/balance.csv,sha256=-7VrGM_IbKhOJzbX-bUMIsnd99uDIBkalTytlj2jVtk,209
|
|
29
29
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/debit_credit.csv,sha256=AaVQ9G5gqsLhxtAsYXCmFCTxpBPonKA1uxy7ue5gYYE,223
|
|
30
30
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/debit_credit_amount.csv,sha256=y-VoBcF_7WaUZhnmOqSuCv7ElCKSHRbsqKWpCH49Ams,369
|
|
31
|
+
odoo/addons/account_statement_import_sheet_file/tests/fixtures/empty_lines_statement.csv,sha256=xdz79S_wAaS4gbUWHuB-AbRSBMsVszmbjDHQ3Mw-6Cg,307
|
|
31
32
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/empty_statement_en.csv,sha256=rSO7KWfNGFl4Npw2HisF6Ke3Sbj2MVnzbTxKhovoxS8,83
|
|
32
33
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/empty_statement_en.xlsx,sha256=GHF5ZWjQNgyPGlHlxgtO4bRbMG4S18O5g5tkPPq9pPg,9041
|
|
33
34
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/meta_data_separated_credit_debit.csv,sha256=bP9oAVsyozBXsT1nfQ4sw9c0Y-YPdEk8TOPxoUrQSIE,512
|
|
@@ -40,10 +41,11 @@ odoo/addons/account_statement_import_sheet_file/tests/fixtures/sample_statement_
|
|
|
40
41
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/sample_statement_en.csv,sha256=6WexRDEog728ur2DK7J_xI056FCrX5CkB-3xK6LixAM,265
|
|
41
42
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/sample_statement_en.xlsx,sha256=eOpaIIiKh6hTE_ebGwCgIaJBpoehKEQAqrXjHiMklVQ,5101
|
|
42
43
|
odoo/addons/account_statement_import_sheet_file/tests/fixtures/sample_statement_en_empty_values.xlsx,sha256=hNsBB9zBQG11On56axs8nZRrzff9d6DFVyQGsyuRb_M,6501
|
|
44
|
+
odoo/addons/account_statement_import_sheet_file/tests/fixtures/sample_statement_offsets.xlsx,sha256=zfuCnPrKeXQmZ3VV3FgdMY59ZDt7WOQx5PYNchNbUp0,5993
|
|
43
45
|
odoo/addons/account_statement_import_sheet_file/views/account_journal_views.xml,sha256=h3A5JmNGunmCybjD_Gx_v6PghhHy0TOqos3Bu5PHhTk,594
|
|
44
46
|
odoo/addons/account_statement_import_sheet_file/views/account_statement_import.xml,sha256=KhgiMxHjI5tq1RlkmDYOhejqrxN4mXLc5nT9EM9gQ5s,842
|
|
45
|
-
odoo/addons/account_statement_import_sheet_file/views/account_statement_import_sheet_mapping.xml,sha256=
|
|
46
|
-
odoo_addon_account_statement_import_sheet_file-17.0.1.
|
|
47
|
-
odoo_addon_account_statement_import_sheet_file-17.0.1.
|
|
48
|
-
odoo_addon_account_statement_import_sheet_file-17.0.1.
|
|
49
|
-
odoo_addon_account_statement_import_sheet_file-17.0.1.
|
|
47
|
+
odoo/addons/account_statement_import_sheet_file/views/account_statement_import_sheet_mapping.xml,sha256=_NrwpFVmFcugUBoWBMTkHXp_s_Y1oZN9dec0ya-gkbc,6374
|
|
48
|
+
odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info/METADATA,sha256=Y5a8rKIo1dkVNV7iD_vQdg-XgLRC-EzFPk4M9PGQ33w,5263
|
|
49
|
+
odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
|
50
|
+
odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
51
|
+
odoo_addon_account_statement_import_sheet_file-17.0.1.1.0.dist-info/RECORD,,
|