From 450baf6093d8afeb346502d8021e48aa1ac3eb74 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Thu, 20 Apr 2017 10:44:30 +0200 Subject: [PATCH] camt: crop datetime into date when importing CreDtTm typically looks like `2014-01-06T16:20:26.673Z`, but odoo expects just `2014-01-06`. --- account_bank_statement_import_camt/camt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/account_bank_statement_import_camt/camt.py b/account_bank_statement_import_camt/camt.py index 81e480c..14165f3 100644 --- a/account_bank_statement_import_camt/camt.py +++ b/account_bank_statement_import_camt/camt.py @@ -170,6 +170,7 @@ class CamtParser(object): ns, node, './ns:Id', result, 'name') self.add_value_from_node( ns, node, './ns:CreDtTm', result, 'date') + result['date'] = result['date'].split('T')[0] self.add_value_from_node( ns, node, './ns:Acct/ns:Ccy', result, 'currency') result['balance_start'], result['balance_end_real'] = (