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.

21 lines
817 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 api, models
  5. class IrProperty(models.Model):
  6. _inherit = "ir.property"
  7. @api.multi
  8. def write(self, vals):
  9. res = super(IrProperty, self).write(vals)
  10. field_object_list = [
  11. self.env.ref("base.field_res_users__email"),
  12. self.env.ref("mail.field_mail_template__body_html"),
  13. self.env.ref("mail.field_mail_template__mail_server_id"),
  14. self.env.ref("mail.field_mail_template__report_template"),
  15. ]
  16. for fobj in field_object_list:
  17. self._update_db_value_website_dependent(fobj)
  18. return res