Transaction description is blank when importing some OFX files
When importing OFX files generated by some banks the description field is not filled in from the OFX data, making it hard for the user to correctly identify the transactions. (e.g: https://discuss.tryton.org/t/create-journal-for-ofx-import/1526/9).
It appears that the banks are using the name element* inside the stmttrn aggregate* for the description of the transaction. This is then parsed by ofxparse into the payee field and the memo field is left blank, which results in blank descriptions.
Rather confusingly, the OFX spec (https://www.ofx.net/downloads/OFX%202.2.pdf) says (on page 216) the name element* is for the "Name of payee or description of transaction".
Definitions from OFX spec:
*element: a tag that contains only data and no other tags.
*aggregate: a tag that contains other tags and no data.
Examples of parts of OFX data downloaded from two different banks, which don't have the memo element*, and which show the name element* being used for the transaction description:
----------------
<STMTTRN>
<TRNTYPE>OTHER
<DTPOSTED>20191112000000[-5:EST]
<TRNAMT>-12.34
<FITID>+201911120000001
<NAME>100457
</STMTTRN>
<STMTTRN>
<TRNTYPE>DIRECTDEBIT
<DTPOSTED>20191111000000[-5:EST]
<TRNAMT>-123.45
<FITID>+201911110000001
<NAME>B/CARD PLAT VISA 123456789012345
</STMTTRN>
----------------
<STMTTRN>
<TRNTYPE>POS</TRNTYPE>
<DTPOSTED>20191111120000.000[+1]</DTPOSTED>
<TRNAMT>-1.2</TRNAMT>
<FITID>00POS201911111200000001-12TESCOSTORESGB</FITID>
<NAME>TESCO STORES GB</NAME>
</STMTTRN>
<STMTTRN>
<TRNTYPE>CREDIT</TRNTYPE>
<DTPOSTED>20191112120000.000[+1]</DTPOSTED>
<TRNAMT>12.34</TRNAMT>
<FITID>00CREDIT2019111212000000011234BankcreditfromXXXXXXXXXXXX</FITID>
<NAME>Bank credit from XXXXXXXX XXXX</NAME>
</STMTTRN>
----------------