diff --git a/l10n_br_account_payment_brcobranca/models/account_move.py b/l10n_br_account_payment_brcobranca/models/account_move.py index c9c6e8ef8f4a..7d1624e7be52 100644 --- a/l10n_br_account_payment_brcobranca/models/account_move.py +++ b/l10n_br_account_payment_brcobranca/models/account_move.py @@ -71,7 +71,12 @@ def _get_brcobranca_boleto(self, boletos): brcobranca_service_url, self.name, ) - res = requests.post(brcobranca_service_url, data={"type": "pdf"}, files=files) + res = requests.post( + brcobranca_service_url, + data={"type": "pdf"}, + files=files, + timeout=5, + ) if str(res.status_code)[0] == "2": pdf_string = res.content diff --git a/l10n_br_account_payment_brcobranca/models/account_payment_order.py b/l10n_br_account_payment_brcobranca/models/account_payment_order.py index 33c3c322e376..5c2d3b2b13b3 100644 --- a/l10n_br_account_payment_brcobranca/models/account_payment_order.py +++ b/l10n_br_account_payment_brcobranca/models/account_payment_order.py @@ -190,6 +190,7 @@ def _get_brcobranca_remessa(self, bank_brcobranca, remessa_values, cnab_type): "bank": bank_brcobranca.name, }, files=files, + timeout=5, ) if cnab_type == "240" and "R01" in res.text[242:254]: diff --git a/l10n_br_account_payment_brcobranca/parser/cnab_file_parser.py b/l10n_br_account_payment_brcobranca/parser/cnab_file_parser.py index 955a0896810b..719909112cf8 100644 --- a/l10n_br_account_payment_brcobranca/parser/cnab_file_parser.py +++ b/l10n_br_account_payment_brcobranca/parser/cnab_file_parser.py @@ -91,6 +91,7 @@ def _get_brcobranca_retorno(self, files): "bank": bank_name_brcobranca, }, files=files, + timeout=5, ) if res.status_code != 201: