Browse Source

Merge PR #223 into 12.0

Signed-off-by pedrobaeza
12.0
OCA-git-bot 5 years ago
parent
commit
a932aa718b
  1. 12
      account_bank_statement_import_camt_oca/models/parser.py

12
account_bank_statement_import_camt_oca/models/parser.py

@ -86,8 +86,16 @@ class CamtParser(models.AbstractModel):
party_node = node.xpath(
'./ns:RltdPties/ns:%s' % party_type, namespaces={'ns': ns})
if party_node:
self.add_value_from_node(
ns, party_node[0], './ns:Nm', transaction, 'partner_name')
name_node = node.xpath(
'./ns:RltdPties/ns:%s/ns:Nm' % party_type,
namespaces={'ns': ns})
if name_node:
self.add_value_from_node(
ns, party_node[0], './ns:Nm', transaction, 'partner_name')
else:
self.add_value_from_node(
ns, party_node[0], './ns:PstlAdr/ns:AdrLine',
transaction, 'partner_name')
# Get remote_account from iban or from domestic account:
account_node = node.xpath(
'./ns:RltdPties/ns:%sAcct/ns:Id' % party_type,

Loading…
Cancel
Save