Skip to content

Commit

Permalink
fixup! [ADD] datev_export_dtvf_nitrokey
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn authored and jans23 committed Aug 5, 2024
1 parent 5b7b1d4 commit d45ea26
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions datev_export_dtvf_nitrokey/models/datev_export_dtvf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ def _get_data_transaction(self, move):
for data in super()._get_data_transaction(move):
for line in move.line_ids:
for field_name in ("ref", "name", "move_name"):
if (line[field_name] or "").startswith("SO") or (
line[field_name] or ""
).startswith("EK"):
data["Belegfeld 1"] = line[field_name]
for token in (line[field_name] or "").split():
if (
token.startswith("SO")
or token.startswith("EK")
or token.startswith("GSV")
):
data["Belegfeld 1"] = token
yield data
1 change: 1 addition & 0 deletions datev_export_dtvf_nitrokey/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_datev_export_dtvf_nitrokey
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from odoo.addons.datev_export_dtvf.tests.test_datev_export_dtvf import TestDatevExportDtvf

0 comments on commit d45ea26

Please sign in to comment.