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
833 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 LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  4. from odoo import models, api
  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