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.

27 lines
1.1 KiB

7 years ago
7 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. from odoo import models, fields
  7. class ServerAction(models.Model):
  8. """
  9. Possibility to specify the SMS Gateway when configure this server action
  10. """
  11. _inherit = 'ir.actions.server'
  12. mobile = fields.Char(
  13. string='Mobile No',
  14. help="Field to be used to fetch the mobile number, e.g. you select"
  15. " the invoice model and `object.invoice_address_id.mobile` "
  16. "will be the field providing the correct mobile number.")
  17. sms = fields.Char(string='SMS', size=160, translate=True)
  18. sms_server_id = fields.Many2one(
  19. comodel_name='sms.gateway', string='SMS Server',
  20. help='Select the SMS Gateway configuration to use with this action.')
  21. sms_template_id = fields.Many2one(
  22. comodel_name='mail.template', string='SMS Template',
  23. help='Select the SMS Template configuration to use with this action.')