mirror of
https://github.com/bringout/euro-office.git
synced 2026-04-18 02:02:00 +02:00
Based on onlyoffice_odoo by Ascensio System SIA (ONLYOFFICE, LGPL-3). Rebranded and adapted for Euro-Office by bring.out d.o.o. Modules: - eurooffice_odoo: base integration - eurooffice_odoo_templates: document templates - eurooffice_odoo_oca_dms: OCA DMS integration (replaces Enterprise documents) All references renamed: onlyoffice -> eurooffice, ONLYOFFICE -> Euro-Office. Original copyright notices preserved.
14 lines
480 B
Python
14 lines
480 B
Python
import logging
|
|
|
|
from odoo.addons.eurooffice_odoo.utils import config_utils
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
def replace_public_url_to_internal(env, url):
|
|
public_url = config_utils.get_doc_server_public_url(env)
|
|
inner_url = config_utils.get_doc_server_inner_url(env)
|
|
if inner_url and inner_url != public_url:
|
|
_logger.info("Replace public url %s to internal url %s", public_url, inner_url)
|
|
url = url.replace(public_url, inner_url)
|
|
return url
|