You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
511 B

  1. # Copyright 2018,2020 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  2. # License MIT (https://opensource.org/licenses/MIT).
  3. # License OPL-1 (https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html#odoo-apps) for derivative work.
  4. from odoo import fields, models
  5. class Message(models.Model):
  6. _inherit = "mail.message"
  7. def _default_mail_server_id(self):
  8. return self.env.website.mail_server_id.id
  9. mail_server_id = fields.Many2one(default=_default_mail_server_id)