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.

18 lines
551 B

  1. # Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  2. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  3. from odoo import fields, models
  4. class MailTest(models.Model):
  5. _inherit = "mail.test"
  6. company_id = fields.Many2one(
  7. "res.company",
  8. default=lambda self: self.env["res.company"]._company_default_get(),
  9. )
  10. website_id = fields.Many2one(
  11. "website",
  12. default=lambda self: self.env["website"].browse(
  13. self.env.context.get("website_id")
  14. ),
  15. )