2 Commits
Author SHA1 Message Date
Jairo Llopis 6fda467597 [FIX] tests: make sure screencasts dir exists before writing to it
Without this patch, running this command on an environment where the tour will fail, will create massive and useless logs:

    odoo --stop-after-init -i auth_totp --test-enable --test-tags /auth_totp

This is because this method is a callback that can come in a different thread, creating a race condition.

There's no problem on checking wether the directory exists before creating the file, and then safeguarding from the problem.

@moduon MT-1075

closes odoo/odoo#151579

X-original-commit: 7aca8ae8728c66700c3afdca350e99ea78a63d88
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2024-01-30 12:19:57 +00:00
Jairo Llopis abb708f7de [FIX] base: select appropriate address for SMTP connection check
Before this patch, when doing an SMTP connectivity check, Odoo always checked if the current user with their current email address could connect.

That was inaccurate because:
1. If the `ir.mail_server` were configured with an email address as `from_filter`, that's going to be the address used to connect with the server always; never your user email.
2. If it were configured with a domain as `from_filter` and your user had an email from another domain, your outgoing emails are going to get wrapped into that domain (SRS-like). Again, the connectivity check wouldn't be imitating real world connections.

After the patch, both situations are taken into account when deciding the outgoing address that's going to be used for testing the connection. This will reduce false negatives when testing connectivity.

@moduon MT-1064 OPW-2942814

closes odoo/odoo#105033

X-original-commit: f1e5e8ca42fbab77649b95fd0b2d09c46f6878fc
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-11-04 16:59:59 +01:00