Skip to content

Conversation

@rven
Copy link

@rven rven commented Oct 4, 2025

No description provided.

jgrandguillaume and others added 30 commits October 3, 2025 15:56
* Move mail_environment in root folder
* Use absolute imports for openerp and new Model classes
* Use cr argument instead of cursor, propagate context
* Update fields, remove deprecated 'method' argument, change 'states'
  otherwise the fields are not readonly (seems that the 'states' of the
  original field is kept.
* Activate the installable flag
* Indentation of the view with 2 spaces
* Remove only the attrs attribute instead of redefining the whole field
* pep8
* crm is not a dependency for mail_environment
* Fix typo in manifest
In order to get visibility on https://www.odoo.com/apps the OCA board has
decided to add the OCA as author of all the addons maintained as part of the
association.
rename *_xml entries in manifest
[MIG] Rename manifest files
Currently translated at 100.0% (6 of 6 strings)

Translation: server-env-12.0/server-env-12.0-mail_environment
Translate-URL: https://translation.odoo-community.org/projects/server-env-12-0/server-env-12-0-mail_environment/pt_BR/
moitabenfdz and others added 16 commits October 3, 2025 15:56
Currently translated at 100.0% (6 of 6 strings)

Translation: server-env-17.0/server-env-17.0-mail_environment
Translate-URL: https://translation.odoo-community.org/projects/server-env-17-0/server-env-17-0-mail_environment/it/
Currently translated at 100.0% (6 of 6 strings)

Translation: server-env-18.0/server-env-18.0-mail_environment
Translate-URL: https://translation.odoo-community.org/projects/server-env-18-0/server-env-18-0-mail_environment/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-env-18.0/server-env-18.0-mail_environment
Translate-URL: https://translation.odoo-community.org/projects/server-env-18-0/server-env-18-0-mail_environment/
Currently translated at 100.0% (8 of 8 strings)

Translation: server-env-18.0/server-env-18.0-mail_environment
Translate-URL: https://translation.odoo-community.org/projects/server-env-18-0/server-env-18-0-mail_environment/it/
Currently translated at 62.5% (5 of 8 strings)

Translation: server-env-18.0/server-env-18.0-mail_environment
Translate-URL: https://translation.odoo-community.org/projects/server-env-18-0/server-env-18-0-mail_environment/fr/
…r.mail_server` model

This field is used to choose the authentication method, and used by core modules
`google_gmail` and `microsoft_outlook`, for example, to define their own
authentication methods.
@rven rven mentioned this pull request Oct 4, 2025
6 tasks
@rousseldenis
Copy link
Contributor

/ocabot migration mail_environment

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Oct 11, 2025
@cyrilmanuel
Copy link

cyrilmanuel commented Oct 24, 2025

@rven @rousseldenis @leemannd Guys, i have found an error !

To test it you can run the runbot of this PR and just go to your user parameters, you will see an error message directly. (or go to res_users --> select a user) a problem occure because this code on the odoo core had change the logic :

Odoo 19.0 code is performing a search on the field smtp_user which is not possible when having a non stored field.

The field in question is https://github.com/odoo/odoo/blame/19.0/addons/mail/models/res_users.py#L136
It has been added to allow the usage of personal mail servers -> odoo/odoo@0716067

that mean we need to override the method _compute_outgoing_mail_server_id to get out the smtp_user or find another solution.

To test it you can run the runbot of this PR and just go to your user, you will see an error message directly.

@rven rven force-pushed the 19.0-mig-mail_environment branch from 78abc9b to 9fb7434 Compare October 24, 2025 13:44
@rven
Copy link
Author

rven commented Oct 24, 2025

@cyrilmanuel smtp_user error should be fixed!

@rven rven force-pushed the 19.0-mig-mail_environment branch from 9fb7434 to 011eda9 Compare October 24, 2025 13:53
@rven
Copy link
Author

rven commented Oct 24, 2025

smtp_host was giving the same issues.

        <record id="view_ir_mail_server_search" model="ir.ui.view">
            <field name="model">ir.mail_server</field>
            <field name="arch" type="xml">
                <search string="Outgoing Mail Servers">
                    <field name="name"
                        filter_domain="['|', '|',
                                        ('name', 'ilike', self),
                                        ('smtp_host', 'ilike', self),
                                        ('smtp_user', 'ilike', self)]"
                        string="Outgoing Mail Server"/>

Copy link
Member

@FrancoMaxime FrancoMaxime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: code review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.