[FIX] absi- _paypal Module did not properly check input.

If passed any csv file, paypal module would try to use it, even if clearly not
a paypal file.
This commit is contained in:
Ronald Portier
2021-03-30 11:05:06 +02:00
committed by Ronald Portier (Therp BV)
parent f637f44eba
commit 2552e1e979

View File

@@ -110,6 +110,8 @@ class AccountBankStatementImportPayPalParser(models.TransientModel):
header = list(next(csv_data))
data_dict = self._data_dict_constructor(mapping, header)
if data_dict.get("currency_column") is None:
raise ValueError(_("No currency column, not a valid Paypal file"))
return self._calculate_lines(csv_data, data_dict, mapping, currency_code)