1 parent
05b4e9a6e9
commit
84c47a0433
11 files changed
+47
-12
No files matched your search
@@ -30,7 +30,7 @@ from trytond.tools import pairwise_longest
|
||||
from trytond.tools.chart import sparkline
|
||||
from trytond.tools.email_ import format_address, has_rcpt, set_from_header
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.url import http_host
|
||||
from trytond.url import http_base
|
||||
from trytond.wsgi import Base64Converter
|
||||
|
||||
from .exceptions import ConditionError, DomainError, TemplateError
|
||||
@@ -636,7 +636,7 @@ class Activity(
|
||||
Email = pool.get('ir.email')
|
||||
record = record_activity.record
|
||||
url_base = config.get(
|
||||
'marketing', 'automation_base', default=http_host())
|
||||
'marketing', 'automation_base', default=http_base())
|
||||
url_open = urljoin(url_base, '/m/empty.gif')
|
||||
|
||||
with Transaction().set_context(language=record.language):
|
||||
|
||||
@@ -26,7 +26,7 @@ from trytond.tools.email_ import (
|
||||
EmailNotValidError, format_address, normalize_email, set_from_header,
|
||||
validate_email)
|
||||
from trytond.transaction import Transaction, inactive_records
|
||||
from trytond.url import http_host
|
||||
from trytond.url import http_base
|
||||
from trytond.wizard import Button, StateTransition, StateView, Wizard
|
||||
|
||||
from .exceptions import EMailValidationError, TemplateError
|
||||
@@ -430,7 +430,7 @@ class Message(Workflow, ModelSQL, ModelView):
|
||||
spy_pixel = config.getboolean(
|
||||
'marketing', 'email_spy_pixel', default=False)
|
||||
|
||||
url_base = config.get('marketing', 'email_base', default=http_host())
|
||||
url_base = config.get('marketing', 'email_base', default=http_base())
|
||||
url_open = urljoin(url_base, '/m/empty.gif')
|
||||
|
||||
@lru_cache(None)
|
||||
|
||||
@@ -16,7 +16,7 @@ from trytond.pool import PoolMeta
|
||||
from trytond.pyson import Bool, Eval, If
|
||||
from trytond.tools import slugify
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.url import http_host
|
||||
from trytond.url import http_base
|
||||
from trytond.wsgi import Base64Converter
|
||||
|
||||
from .exceptions import ImageValidationError
|
||||
@@ -77,7 +77,7 @@ class ImageURLMixin:
|
||||
url_base = config.get(
|
||||
'product', 'image_base', default='')
|
||||
url_external_base = config.get(
|
||||
'product', 'image_base', default=http_host())
|
||||
'product', 'image_base', default=http_base())
|
||||
return self._image_url(
|
||||
url_external_base if _external else url_base, **args)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import trytond.config as config
|
||||
from trytond.model import ModelSQL, ModelView, fields
|
||||
from trytond.pool import Pool
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.url import http_host
|
||||
from trytond.url import http_base
|
||||
from trytond.wsgi import Base64Converter
|
||||
|
||||
ALPHABET = string.digits + string.ascii_lowercase
|
||||
@@ -37,7 +37,7 @@ class ShortenedURL(ModelSQL, ModelView):
|
||||
'database': Base64Converter(None).to_url(
|
||||
Transaction().database.name),
|
||||
}
|
||||
url_base = config.get('web', 'shortener_base', default=http_host())
|
||||
url_base = config.get('web', 'shortener_base', default=http_base())
|
||||
for shortened in shortened_urls:
|
||||
url_parts['short_id'] = cls._shorten(shortened.id)
|
||||
urls[shortened.id] = urljoin(
|
||||
|
||||
Reference in new issue
Block a user