SaasPortalClient (models/saas_sysadmin_mailgun.py)

odoo-saas-tools · saas_sysadmin_mailgun/models/saas_sysadmin_mailgun.py · python · LGPL-3.0
email

Adds Mailgun domain and route setup for Odoo SaaS portal clients.

# Source: https://github.com/it-projects-llc/odoo-saas-tools | License: LGPL-3.0 | Modified files must remain under LGPL-3.0
# Modifications to this file must remain under LGPL-3.0.
# Provided via justclaw.it.com; keep this notice with the code.
from odoo import models, fields, api
import simplejson
from . import mailgun

import logging
_logger = logging.getLogger(__name__)

try:
    pass
except Exception as e:
    _logger.critical('SAAS Route53 Requires the python library Boto which is not \
    found on your installation')


class SaasPortalClient(models.Model):
    _inherit = 'saas_portal.client'

    mail_domain = fields.Char('Mail domain')

    @api.multi
    def _create_domain_on_mailgun(self):
        '''Create domain on mailgun and return data to configure dns and smtp'''

        

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key