Merge pull request #46 from bizzappdev/7.0_default_currency_camt

[IMP] use default currency in case bank statement do not have a ccy tag
This commit is contained in:
Holger Brunn
2014-10-20 11:01:43 +02:00

View File

@@ -150,7 +150,12 @@ CAMT Format parser
identifier)
)
statement.local_currency = self.xpath(node, './ns:Acct/ns:Ccy')[0].text
# Assuming If there is no Ccy tag then it belongs to defaut currency
if not self.xpath(node, './ns:Acct/ns:Ccy'):
statement.local_currency = statement.company_id.currency_id.id
else:
statement.local_currency = self.xpath(node,
'./ns:Acct/ns:Ccy')[0].text
statement.start_balance = self.get_start_balance(node)
statement.end_balance = self.get_end_balance(node)
number = 0