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.

32 lines
1.2 KiB

8 years ago
8 years ago
8 years ago
  1. # coding: utf-8
  2. # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
  3. # Copyright (C) 2013 Julius Network Solutions SARL <contact@julius.fr>
  4. # Copyright (C) 2015 Valentin Chemiere <valentin.chemiere@akretion.com>
  5. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. import logging
  7. from odoo import models, fields
  8. _logger = logging.getLogger('gateway')
  9. class ServerAction(models.Model):
  10. """
  11. Possibility to specify the SMS Gateway when configure this server action
  12. """
  13. _inherit = 'ir.actions.server'
  14. mobile = fields.Char(
  15. string='Mobile No',
  16. help="Field to be used to fetch the mobile number, e.g. you select"
  17. " the invoice model and `object.invoice_address_id.mobile` "
  18. "will be the field providing the correct mobile number.")
  19. sms = fields.Char('SMS', size=160, translate=True)
  20. sms_server = fields.Many2one(
  21. comodel_name='sms.gateway', string='SMS Server',
  22. help='Select the SMS Gateway configuration to use with this action.')
  23. sms_template_id = fields.Many2one(
  24. comodel_name='email.template', string='SMS Template',
  25. help='Select the SMS Template configuration to use with this action.')