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.

20 lines
797 B

  1. # Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  2. # Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
  3. # License MIT (https://opensource.org/licenses/MIT).
  4. from odoo import models
  5. class IrProperty(models.Model):
  6. _inherit = "ir.property"
  7. def write(self, vals):
  8. res = super(IrProperty, self).write(vals)
  9. field_object_list = [
  10. self.env.ref("base.field_res_users__email"),
  11. self.env.ref("mail.field_mail_template__body_html"),
  12. self.env.ref("mail.field_mail_template__mail_server_id"),
  13. self.env.ref("mail.field_mail_template__report_template"),
  14. ]
  15. for fobj in field_object_list:
  16. self._update_db_value_website_dependent(fobj)
  17. return res