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
713 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
  3. # Copyright 2017 Vicent Cubells - <vicent.cubells@tecnativa.com>
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. import logging
  6. try:
  7. from odoo.addons.mail_tracking.hooks import column_add_with_value
  8. except ImportError:
  9. column_add_with_value = False
  10. _logger = logging.getLogger(__name__)
  11. def pre_init_hook(cr):
  12. if column_add_with_value:
  13. _logger.info("Creating mail.mass_mailing.contact.email_score column "
  14. "with value 50.0")
  15. column_add_with_value(
  16. cr, 'mail_mass_mailing_contact', 'email_score', 'double precision',
  17. 50.0)