diff --git a/addons/l10n_in_edi/models/res_config_settings.py b/addons/l10n_in_edi/models/res_config_settings.py index 9a3922d2489..e03440039bd 100644 --- a/addons/l10n_in_edi/models/res_config_settings.py +++ b/addons/l10n_in_edi/models/res_config_settings.py @@ -32,6 +32,15 @@ class ResConfigSettings(models.TransientModel): self.env["account.edi.format"]._l10n_in_edi_authenticate(self.company_id) if not self.company_id.sudo()._l10n_in_edi_token_is_valid(): raise UserError(_("Incorrect username or password, or the GST number on company does not match.")) + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'type': 'info', + 'sticky': False, + 'message': _("API credentials validated successfully"), + } + } def l10n_in_edi_buy_iap(self): if not self.l10n_in_edi_production_env: diff --git a/addons/l10n_in_edi_ewaybill/models/res_config_settings.py b/addons/l10n_in_edi_ewaybill/models/res_config_settings.py index fe251c4f427..e0116805796 100755 --- a/addons/l10n_in_edi_ewaybill/models/res_config_settings.py +++ b/addons/l10n_in_edi_ewaybill/models/res_config_settings.py @@ -22,3 +22,12 @@ class ResConfigSettings(models.TransientModel): if response.get("error"): error_message = "\n".join(["[%s] %s" % (e.get("code"), html_escape(e.get("message"))) for e in response["error"]]) raise UserError(error_message) + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'type': 'info', + 'sticky': False, + 'message': _("API credentials validated successfully"), + } + }