Skip to content
Extraits de code Groupes Projets
Valider 3cb59192 rédigé par Théo - Le Filament's avatar Théo - Le Filament
Parcourir les fichiers

chore: remove unused templates

parent 14f96444
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
{% if odoo_instance_setup.odoo_version == '10.0' %}
#!/usr/bin/env python
{% else %}
#!/usr/bin/env python3
{% endif %}
# -*- coding: utf-8 -*-
import grp
import os
import pwd
import shutil
import subprocess
import yaml
DEFAULT_PRIVATE_REPO = "/opt/odoo/private_addons"
REPO_FILE = "/opt/odoo/private/repos.yaml"
UID = pwd.getpwnam("odoo").pw_uid
GID = grp.getgrnam("odoo").gr_gid
if os.path.isfile(REPO_FILE):
repos = yaml.safe_load(open(REPO_FILE))
if repos:
for repo in repos:
subprocess.run(
[
"git",
"clone",
"--single-branch",
"--branch", repos[repo]["branch"],
"--depth", "1",
repos[repo]["url"],
DEFAULT_PRIVATE_REPO + "/" + repo
],
check=True)
{% if odoo_instance_setup.odoo_version == '10.0' %}
if os.path.isdir("/opt/odoo/private_addons/lf_theme"):
if not os.path.isfile("/opt/odoo/private_addons/lf_theme/static\
/src/less/lefilament_variable.less"):
shutil.copy("/opt/odoo/private_addons/lf_theme/static/src/less/lefilament_variable_origin.less", "/opt/odoo/private_addons/lf_theme/static/src/less/lefilament_variable.less")
{% endif %}
{% if odoo_instance_setup.odoo_version == '10.0' %}
#!/usr/bin/env python
{% else %}
#!/usr/bin/env python3
{% endif %}
# -*- coding: utf-8 -*-
import grp
import os
import pwd
import shutil
import subprocess
{% if odoo_instance_setup.odoo_version == '10.0' %}
from urlparse import urlsplit
{% else %}
from urllib.parse import urlsplit
{% endif %}
import yaml
DEFAULT_PRIVATE_REPO = "/opt/odoo/additional_addons"
REPO_ADDON_FILE = "/opt/odoo/private/repos-addons.yaml"
UID = pwd.getpwnam("odoo").pw_uid
GID = grp.getgrnam("odoo").gr_gid
if os.path.isfile(REPO_ADDON_FILE):
repos = yaml.safe_load(open(REPO_ADDON_FILE))
if repos:
for url in repos:
repo = urlsplit(url).path
subprocess.run(
[
"git",
"clone",
"--single-branch",
"--branch", repos[url]["branch"],
"--depth", "1",
url, "/tmp/addon" + repo
],
check=True)
for module in repos[url]["modules"]:
shutil.move("/tmp/addon"+repo+"/"+module,
DEFAULT_PRIVATE_REPO+"/"+module)
shutil.rmtree("/tmp/addon")
{% for repo in item.value.other_modules | default([]) | sort(attribute='url') %}
{{ repo.url }}:
{% if repo.branch is defined %}
branch: "{{ repo.branch }}"
{% else %}
branch: "{{ odoo_instance_setup.odoo_version }}"
{% endif %}
modules:
{% for modules in repo.modules | sort %}
- {{ modules }}
{% endfor %}
{% endfor %}
{% for repo in item.value.custom_modules_oca | default([]) | sort(attribute='repo') %}
https://github.com/OCA/{{ repo.repo }}.git:
{% if repo.branch is defined %}
branch: "{{ repo.branch }}"
{% else %}
branch: "{{ odoo_instance_setup.odoo_version }}"
{% endif %}
modules:
{% for modules in repo.modules | sort %}
- {{ modules }}
{% endfor %}
{% endfor %}
{% for repo in item.value.custom_modules | default([]) | sort(attribute='repo') %}
{{ repo.repo | basename }}:
url: "{{ custom_modules_base_url }}/{{ repo.repo }}.git"
{% if repo.branch is defined %}
branch: "{{ repo.branch }}"
{% else %}
branch: "{{ odoo_instance_setup.odoo_version }}"
{% endif %}
{% endfor %}
{% for repo in item.value.other_repos | default([]) | sort(attribute='repo') %}
{{ repo.repo }}:
url: {{ repo.url }}
{% if repo.branch is defined %}
branch: "{{ repo.branch }}"
{% else %}
branch: "{{ odoo_instance_setup.odoo_version }}"
{% endif %}
{% endfor %}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter