Skip to content

Commit

Permalink
[IMP] after migration improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed May 8, 2023
1 parent 14cd3ee commit e2c793b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
1 change: 0 additions & 1 deletion datev_import_csv_dtvf/tests/test_datev_import_csv_dtvf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def test_wizard(self):
.read()
.encode("utf8")
),
"file_format": "genericcsv",
"force_journal_id": self.env["account.journal"]
.search([("type", "=", "sale")], limit=1)
.id,
Expand Down
14 changes: 0 additions & 14 deletions datev_import_csv_dtvf/wizard/import_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,6 @@ class AccountMoveImport(models.TransientModel):
help="File containing the journal entry(ies) to import.",
)
filename = fields.Char()
file_format = fields.Selection(
[("genericcsv", "Generic CSV")],
string="File Format",
required=True,
help="Select the type of file you are importing.",
)
file_encoding = fields.Selection(
[
("utf-8", "UTF-8"),
("windows-1252", "Western (Windows-1252)"),
],
string="File Encoding",
default="utf-8",
)
post_move = fields.Boolean(
string="Post Journal Entry",
help="If True, the journal entry will be posted after the import.",
Expand Down
16 changes: 7 additions & 9 deletions datev_import_csv_dtvf/wizard/import_move_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@
<group name="main">
<field name="file_to_import" filename="filename" />
<field name="filename" invisible="1" />
<field name="file_format" />
<field name="file_encoding" />
<field name="post_move" />
<field name="force_journal_id" required="1" />
<field name="force_move_date" />
<field name="force_move_ref" required="1" />
<field name="force_move_line_name" />
<field name="date_format" invisible="1" />
</group>
<div
name="info-csv"
attrs="{'invisible': [('file_format', '!=', 'genericcsv')]}"
>
<h2>Information about the Generic CSV format</h2>
<div class="bg-warning">
Note this import does not handle taxes!
</div>
<div>
<h2>Information about the DATEV CSV format</h2>
<ul>
<li>
<em>First Row : contains information like year</em>
Expand Down Expand Up @@ -85,15 +83,15 @@
</record>

<record id="account_move_import_action" model="ir.actions.act_window">
<field name="name">Import Account Move</field>
<field name="name">Import DATEV Format (.csv)</field>
<field name="res_model">account.move.import</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>

<menuitem
id="account_move_import_menu"
parent="account.menu_finance_entries"
parent="account.menu_finance_entries_actions"
action="account_move_import_action"
sequence="150"
/>
Expand Down

0 comments on commit e2c793b

Please sign in to comment.