mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[MIG] account_statement_import_txt_xlsx: Migration to 15.0
[UPD] Update account_statement_import_txt_xlsx.pot [UPD] README.rst
This commit is contained in:
@@ -43,7 +43,6 @@ class AccountStatementImportSheetMapping(models.Model):
|
||||
default="utf-8",
|
||||
)
|
||||
delimiter = fields.Selection(
|
||||
string="Delimiter",
|
||||
selection=[
|
||||
("dot", "dot (.)"),
|
||||
("comma", "comma (,)"),
|
||||
@@ -55,26 +54,22 @@ class AccountStatementImportSheetMapping(models.Model):
|
||||
default="comma",
|
||||
)
|
||||
quotechar = fields.Char(string="Text qualifier", size=1, default='"')
|
||||
timestamp_format = fields.Char(string="Timestamp Format", required=True)
|
||||
timestamp_column = fields.Char(string="Timestamp column", required=True)
|
||||
timestamp_format = fields.Char(required=True)
|
||||
timestamp_column = fields.Char(required=True)
|
||||
currency_column = fields.Char(
|
||||
string="Currency column",
|
||||
help=(
|
||||
"In case statement is multi-currency, column to get currency of "
|
||||
"transaction from"
|
||||
),
|
||||
)
|
||||
amount_column = fields.Char(
|
||||
string="Amount column",
|
||||
required=True,
|
||||
help="Amount of transaction in journal's currency",
|
||||
)
|
||||
balance_column = fields.Char(
|
||||
string="Balance column",
|
||||
help="Balance after transaction in journal's currency",
|
||||
)
|
||||
original_currency_column = fields.Char(
|
||||
string="Original currency column",
|
||||
help=(
|
||||
"In case statement provides original currency for transactions "
|
||||
"with automatic currency conversion, column to get original "
|
||||
@@ -82,7 +77,6 @@ class AccountStatementImportSheetMapping(models.Model):
|
||||
),
|
||||
)
|
||||
original_amount_column = fields.Char(
|
||||
string="Original amount column",
|
||||
help=(
|
||||
"In case statement provides original currency for transactions "
|
||||
"with automatic currency conversion, column to get original "
|
||||
@@ -97,36 +91,24 @@ class AccountStatementImportSheetMapping(models.Model):
|
||||
),
|
||||
)
|
||||
debit_value = fields.Char(
|
||||
string="Debit value",
|
||||
help="Value of debit/credit column that indicates if it's a debit",
|
||||
default="D",
|
||||
)
|
||||
credit_value = fields.Char(
|
||||
string="Credit value",
|
||||
help="Value of debit/credit column that indicates if it's a credit",
|
||||
default="C",
|
||||
)
|
||||
transaction_id_column = fields.Char(
|
||||
string="Unique transaction ID column",
|
||||
)
|
||||
description_column = fields.Char(
|
||||
string="Description column",
|
||||
)
|
||||
notes_column = fields.Char(
|
||||
string="Notes column",
|
||||
)
|
||||
reference_column = fields.Char(
|
||||
string="Reference column",
|
||||
)
|
||||
partner_name_column = fields.Char(
|
||||
string="Partner Name column",
|
||||
)
|
||||
description_column = fields.Char()
|
||||
notes_column = fields.Char()
|
||||
reference_column = fields.Char()
|
||||
partner_name_column = fields.Char()
|
||||
bank_name_column = fields.Char(
|
||||
string="Bank Name column",
|
||||
help="Partner's bank",
|
||||
)
|
||||
bank_account_column = fields.Char(
|
||||
string="Bank Account column",
|
||||
help="Partner's bank account",
|
||||
)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class AccountStatementImportSheetParser(models.TransientModel):
|
||||
values = sheet.row_values(0)
|
||||
return [str(value) for value in values]
|
||||
except xlrd.XLRDError:
|
||||
pass
|
||||
_logger.error("Pass this method")
|
||||
|
||||
data = StringIO(data_file.decode(encoding or "utf-8"))
|
||||
csv_data = reader(data, **csv_options)
|
||||
|
||||
Reference in New Issue
Block a user