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
745 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 models, api
  4. class IrProperty(models.Model):
  5. _inherit = 'ir.property'
  6. @api.multi
  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