[IMP] account_statement_import_txt_xlsx: wizard: 2 amount columns, for IN and OUT

[IMP] account_statement_import_txt_xlsx: wizard: amount2_reverse boolean field, with tests
This commit is contained in:
Henrik Norlin
2022-04-03 15:06:07 +02:00
committed by Rocío Vega
parent 2683695163
commit ddcd036186
7 changed files with 95 additions and 2 deletions

View File

@@ -42,6 +42,14 @@ class AccountStatementImportSheetMappingWizard(models.TransientModel):
amount_column = fields.Char(
help="Amount of transaction in journal's currency",
)
amount2_column = fields.Char(
string="Amount2 column",
help="Some statements have two amount columns, for IN and OUT",
)
amount2_reverse = fields.Boolean(
string="Amount2 reverse +/-",
help="If there are positive numbers for money going OUT, reverse +/-",
)
balance_column = fields.Char(
help="Balance after transaction in journal's currency",
)

View File

@@ -52,6 +52,12 @@
context="{'header': header}"
attrs="{'required': [('state', '=', 'final')]}"
/>
<field
name="amount2_column"
widget="dynamic_dropdown"
values="statement_columns"
context="{'header': header}"
/>
<field
name="balance_column"
widget="dynamic_dropdown"