These changes are made as a result of simplifying attrs and 'states' in
views.
Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.
Part-of: odoo/odoo#104741
The orginal PR and it's forward ports https://github.com/odoo/odoo/pull/121048
intorduced an unexpected AttributeError when using OAuth for incoming
mail servers (fetchmail.server). Since `smtp_user` is not a defined field
in fetchmail.server (it uses the field `user` instead), we had to change
the approach.
To prevent this error, we move the UserError call into the respective
ir_mail_server models, which should check the contrains at that level.
This means that before the form gets saved, trying to connect using an
OAuth account, should prompt the user to first specify an smtp_user before
proceeding.
X-original-commit: fcfd72a5e5663fa6b08c80a8a22ec15c8a09456f
Original author: niyasraphy <niyasraphyk@gmail.com>
Conflict resolution for saas-15.2, 16.0, saas-16.2, saas-16.3
closesodoo/odoo#123660
X-original-commit: b0749e430847d2f49e07b119915e8dee0c4e7f00
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.
This commit fixes this issue.
task-3326633
Part of task-3326263
X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
Current behavior:
Connections for outgoing email servers using Outlook/Office365 or
Gmail accounts will establish an OAuth2 authentication for the smtp server.
Through the `ir_mail_server` form view, one can fetch the necessary
tokens by logging in into their Microsoft/Gmail account.
Not specifying an username (`smtp_user`) on the `ir_mail_server` record
will not produce an error while fetching those tokens.
But when trying to test the connection or use that server to send an email,
even if the FROM header is correctly set (i.e. the account email address
authorized to sent emails), the smtp connection will fail. This is due
to the fact that when `smtp_user == False`, the respective method
`_generate_outlook_oauth2_string` or respectively `_generate_oauth2_string`
will not be called and send the necessary OAuth2 string when sending
an email through the smtp connection.
This will lead to a `5.7.57 Client not authenticated to send mail.` error.
After this change:
Add specific UserErrors that get called if `smpt_user == False` before
the actions in `open_google_gmail_uri` and `open_microsoft_outlook_uri`
get called. This forces the user to input a `smpt_user` (field Username)
before the login page for OAuth2 gets called to fetch the tokens.
Note: there is no check if the user inputs the right username, only
that the field is not empty. So it is still possible to input an
invalid username.
opw-3268246
Conflict resolved for 16.0 forward port
Conflict resolved for 16.3 forward port
closesodoo/odoo#121764
X-original-commit: 65b0b876d98dad2aeda5f6ef965f6b7bb68e9424
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: jorv-odoo <jorv@odoo.com>
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.
task-2818586
Part-of: odoo/odoo#116641
Bug
===
Remove the constraint on the from_filter for the Gmail outgoing mail
server, because it can be used for custom domain name, and we can allow
an email address to send as an other one.
E.G. if the user has an email address "admin@mycompany.com" and he
activated "all addresses from the domain", he would be able to set
- email: admin@mycompany.com
- from_filter: mycompany.com
to use the mail servers for all email addresses in the same domain.
Task-3169015
Ticket-3141747
closesodoo/odoo#113959
X-original-commit: e9426c8b7bd4eb3d5c2c1c89fcf6ee3bdef95b3b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Bug
===
When an error occurs, the error received is wrongly stringified.
closesodoo/odoo#112504
X-original-commit: b0641c5e85bf9d2e2c64ba548f7243e0a4196602
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
*: microsoft_outlook, website_twitter
Steps to reproduce:
- install the google_gmail, microsoft_outlook and website_twitter
modules
- go to Settings > General settings > Discuss > External email servers
- for the twitter module go to Settings > Website > Features > Twitter
roller
- the client secret fields are visible
This commit changes the fields types into 'password'.
opw-2936506
closesodoo/odoo#97722
X-original-commit: 18a792ee21441a2e07cef5997368e6d1a268f46c
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: stcc-odoo <stcc@odoo.com>
The `fetchmail` module is build on top of the `mail` module and enables
the incoming email capabilities. However, using the `mail` without
incoming email server is not a good use case.
This commit merges the `fetchmail` moudule into `mail` and lessens the module
complexity, along with adapting the xml/external ids in the dependent modules.
task-2797458
closesodoo/odoo#94143
Related: odoo/upgrade#3615
Related: odoo/enterprise#28659
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Most of the time, both module will be installed at the same time, or
none. For that reason, we want to merge both modules into Google Gmail.
Task-2811567
Part-of: odoo/odoo#88215
* fetchmail, google_gmail, fetchmail_gmail
Purpose
=======
Improve the usability of the outlook modules.
Specifications
==============
Remove the checkbox "Use Outlook" and instead use the
smtp_authentication and the server_type, to be consistent with Gmail.
Hide the password field for Outlook / Gmail mail servers.
Add constraints on the outgoing mail server to force the user to use
the right configuration (e.g. the from_filter, so the sending does not
fail).
Add an option in the mail module to install Outlook.
Show a message for the outgoing mail servers to explain each
authentication methods.
Task-2811567
Part-of: odoo/odoo#88215
It allows to always have a OdooResponse Object and don't allow redirect
to external except when you allow it explicitly with local=False.
Always return to a local url:
/website/add
/slides/slide/<model("slide.slide"):slide>
/microsoft_outlook/confirm
Allow previously external redirect without reason, now blocked
/website/lang/<lang> -> open redirect
Allow external redirect for good reason and url is controlled by code.
/social_facebook/redirect_to_profile/
PS: HTTP Code 303 is a better default for generic redirects. It's not
historically the default for werkzeug.utils, but it is what we want in
general. Contrary to 302, there is no browser-dependent behavior, and
no risk of asking the user whether they want to accept the redirect if
the original method wasn't GET. It's always a non-permanent GET on the
target location.
closesodoo/odoo#95019
X-original-commit: 77f8d9c5d96a9274785ffc2ad83b95ea157d26ad
Related: odoo/enterprise#29000
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Purpose
=======
The flow where we copy / paste the authorization code will be
depreciated. Because of that, we know use the newest authentication
system which use redirect URI.
Technical
=========
Now, the user is redirected to an Odoo endpoint "google_gmail/confirm"
and the access token / refresh token are automatically fetched.
Documentation
https://developers.google.com/identity/protocols/oauth2/native-app
Task-2852560
closesodoo/odoo#94476
X-original-commit: 69bd9bc6b36fdd55e8e859667bcddddad6db7d06
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Bug
===
If you install the module "Google Gmail", you won't be able to save
the settings without filling the API credentials which is annoying.
Task-2837340
closesodoo/odoo#90275
X-original-commit: c09473a4b975287fba8fb862430403d40da2e1ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Do not reset the email configuration when unchecking "is Gmail".
Task-2751996
X-original-commit: d65aef9829cf5554c8d4a6c107ba5269a054ed78
Part-of: odoo/odoo#87731
Bug
===
When we copy a GMail outgoing / incoming mail server, an error
occurs because we try to refetch the access token, based on the same
authorization code (which can be used only once).
To fix this issue, we do not copy the authorization code (and other
related fields).
Task-2751996
X-original-commit: 47c056215c5f50d8a1d9e862ee275eceefdb09e7
Part-of: odoo/odoo#87731
Purpose
=======
A field `use_google_gmail_service` has been used in stable to define
a mail server which use Gmail authentication.
But now that the fields `smtp_authentication` exists, we want to use it
to simplify the mail server form view. For the incoming mail server,
the field `server_type` will be used for the same purpose.
Add a new field to have the option to install `google_gmail` in the
main settings page.
Task-2170676
closesodoo/odoo#83413
Related: odoo/upgrade#3199
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Less secured apps are no longer supported by google, therefore, we need
to transition to the OAuth2 authentication system.
Specifications
==============
1. User will need to fill their Gmail API credentials in the main
settings page
2. Then, in the incoming / outgoing mail server form view, they will
need to tick the Gmail support checkbox
3. A link will be available to be redirected to Gmail and accept the
permission
4. The user can now copy / paste the authorization code in Odoo, set
his email as "login" and then send / receive emails with Gmail
Task-2170676
closesodoo/odoo#83424
X-original-commit: ff223afc5300b2421b8ce935bb468f503c938c5d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>