Browse Source

refactoring

12.0
Vincent Barrier 5 years ago
committed by GitHub
parent
commit
d6c08d0212
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py

4
account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal.py

@ -66,13 +66,13 @@ class AccountBankStatementImport(models.TransientModel):
@api.model
def _check_paypal(self, data_file):
if not self.paypal_map_id:
return False
try:
data_file = self._get_paypal_str_data(data_file)
except UnicodeDecodeError as e:
_logger.debug(e)
return False
if not self.paypal_map_id:
return False
headers = self.mapped('paypal_map_id.map_line_ids.name')
file_headers = data_file.split('\n', 1)[0]
if any(item not in file_headers for item in headers):

Loading…
Cancel
Save