diff --git a/locale/de.po b/locale/de.po index 3aace03..fa4d8f9 100644 --- a/locale/de.po +++ b/locale/de.po @@ -54,6 +54,10 @@ msgctxt "model:ir.message,text:msg_wiz_transactions_error" msgid "When reading the QIF file, there were the following problems:" msgstr "Beim Einlesen der QIF-Datei gab es folgende Probleme:" +msgctxt "model:ir.message,text:mds_import_no_category" +msgid "No category has been assigned for transaction '%(trdata)s'." +msgstr "Für die Transaktion '%(trdata)s' wurde keine Kategorie zugeordnet." + ############# # ir.action # diff --git a/message.xml b/message.xml index b777317..18111aa 100644 --- a/message.xml +++ b/message.xml @@ -41,6 +41,9 @@ full copyright notices and license terms. --> Address + + No category has been assigned for transaction '%(trdata)s'. + diff --git a/qiftool.py b/qiftool.py index 1f9e48c..4ab937d 100644 --- a/qiftool.py +++ b/qiftool.py @@ -400,6 +400,14 @@ class QifTool(Model): if 'splitlines' in line.keys(): line['state'] = 'edit' + # check data + if line['bookingtype'] in ['in', 'out']: + if line.get('category', None) is None: + msg_list.append(gettext( + 'cashbook_dataexchange.mds_import_no_category', + trdata = str(transaction))) + fail_cnt += 1 + to_create.append(line) return (to_create, msg_list, fail_cnt)