changeset 3f2fdc134660 in modules/account_statement_ofx:default
details: 
https://hg.tryton.org/modules/account_statement_ofx?cmd=changeset;node=3f2fdc134660
description:
        Add unrecognized payees to origin description

        issue8857
        review276391005
diffstat:

 CHANGELOG  |  2 ++
 account.py |  6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 655bb5bec23b -r 3f2fdc134660 CHANGELOG
--- a/CHANGELOG Mon Nov 04 12:54:49 2019 +0100
+++ b/CHANGELOG Mon Nov 25 11:13:51 2019 +0100
@@ -1,3 +1,5 @@
+* Add unrecognized payees to origin description
+
 Version 5.4.0 - 2019-11-04
 * Bug fixes (see mercurial logs for details)
 
diff -r 655bb5bec23b -r 3f2fdc134660 account.py
--- a/account.py        Mon Nov 04 12:54:49 2019 +0100
+++ b/account.py        Mon Nov 25 11:13:51 2019 +0100
@@ -71,7 +71,11 @@
         origin.date = transaction.date.date()
         origin.amount = transaction.amount
         origin.party = self.ofx_party(ofx_account, transaction)
-        origin.description = transaction.memo
+        if origin.party:
+            origin.description = transaction.memo
+        else:
+            origin.description = '|'.join(
+                filter(None, [transaction.payee, transaction.memo]))
         origin.information = self.ofx_information(ofx_account, transaction)
         return [origin]
 

Reply via email to