Format
This commit is contained in:
parent
e08b402f3a
commit
327870a175
7 changed files with 19 additions and 13 deletions
|
|
@ -119,9 +119,7 @@ def search_and_replace(
|
||||||
# new_file_content = (
|
# new_file_content = (
|
||||||
# f'{f_lines[:t_index_second_quote]}"{models_name}"{f_lines[t_index_third_quote + len(second_char):]}'
|
# f'{f_lines[:t_index_second_quote]}"{models_name}"{f_lines[t_index_third_quote + len(second_char):]}'
|
||||||
# )
|
# )
|
||||||
new_file_content = (
|
new_file_content = f'{f_lines[:t_index_second_quote]}"{models_name}"{f_lines[t_index_third_quote + len(second_char):]}'
|
||||||
f'{f_lines[:t_index_second_quote]}"{models_name}"{f_lines[t_index_third_quote + len(second_char):]}'
|
|
||||||
)
|
|
||||||
return new_file_content
|
return new_file_content
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,10 @@ def main():
|
||||||
|
|
||||||
# not finish to empty the queue
|
# not finish to empty the queue
|
||||||
if dct_depend_image:
|
if dct_depend_image:
|
||||||
_logger.info("Missing dependencies, auto-run all image generation for last execution")
|
_logger.info(
|
||||||
|
"Missing dependencies, auto-run all image generation for last"
|
||||||
|
" execution"
|
||||||
|
)
|
||||||
for depend_image, lst_module in dct_depend_image.items():
|
for depend_image, lst_module in dct_depend_image.items():
|
||||||
lst_queue_parallel.append(lst_module)
|
lst_queue_parallel.append(lst_module)
|
||||||
# print command to execute
|
# print command to execute
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,9 @@ def edit_text(config):
|
||||||
if is_find:
|
if is_find:
|
||||||
key = "image:"
|
key = "image:"
|
||||||
value = lst_docker_info[i]
|
value = lst_docker_info[i]
|
||||||
lst_docker_info[
|
lst_docker_info[i] = (
|
||||||
i
|
f"{value[:value.find(key) + len(key)]} {config.prod_version}\n"
|
||||||
] = f"{value[:value.find(key) + len(key)]} {config.prod_version}\n"
|
)
|
||||||
break
|
break
|
||||||
if "ERPLibre" in docker_info:
|
if "ERPLibre" in docker_info:
|
||||||
is_find = True
|
is_find = True
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ def get_lst_requirements_txt():
|
||||||
def get_lst_manifest_py():
|
def get_lst_manifest_py():
|
||||||
return get_file_from_glob("__manifest__.py")
|
return get_file_from_glob("__manifest__.py")
|
||||||
|
|
||||||
|
|
||||||
def get_file_from_glob(glob_txt):
|
def get_file_from_glob(glob_txt):
|
||||||
with open(".odoo-version") as txt:
|
with open(".odoo-version") as txt:
|
||||||
odoo_version = txt.read()
|
odoo_version = txt.read()
|
||||||
|
|
@ -77,7 +78,9 @@ def get_file_from_glob(glob_txt):
|
||||||
a_dirname = os.path.dirname(a)
|
a_dirname = os.path.dirname(a)
|
||||||
if a_dirname.startswith(".repo/") or a_dirname.startswith(".venv"):
|
if a_dirname.startswith(".repo/") or a_dirname.startswith(".venv"):
|
||||||
continue
|
continue
|
||||||
if a_dirname.startswith("addons") and not a_dirname.startswith(f"addons.odoo{odoo_version}"):
|
if a_dirname.startswith("addons") and not a_dirname.startswith(
|
||||||
|
f"addons.odoo{odoo_version}"
|
||||||
|
):
|
||||||
continue
|
continue
|
||||||
lst_v.append(a)
|
lst_v.append(a)
|
||||||
return lst_v
|
return lst_v
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,13 @@ def run(config, selenium_tool):
|
||||||
try:
|
try:
|
||||||
connexion_button = selenium_tool.driver.find_element(
|
connexion_button = selenium_tool.driver.find_element(
|
||||||
By.XPATH,
|
By.XPATH,
|
||||||
"/html/body/div/div/div/form/div[3]/button"
|
"/html/body/div/div/div/form/div[3]/button",
|
||||||
# '//button[contains(text(), "Log in")]'
|
# '//button[contains(text(), "Log in")]'
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
connexion_button = selenium_tool.driver.find_element(
|
connexion_button = selenium_tool.driver.find_element(
|
||||||
By.XPATH,
|
By.XPATH,
|
||||||
"/html/body/div/main/div/form/div[3]/button"
|
"/html/body/div/main/div/form/div[3]/button",
|
||||||
# '//button[contains(text(), "Connexion")]'
|
# '//button[contains(text(), "Connexion")]'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -483,7 +483,9 @@ class Update:
|
||||||
pycharm_is_installed = os.path.exists(".idea")
|
pycharm_is_installed = os.path.exists(".idea")
|
||||||
if not pycharm_is_installed or not self.execute_log:
|
if not pycharm_is_installed or not self.execute_log:
|
||||||
return
|
return
|
||||||
os.system("./.venv/bin/python ./script/ide/pycharm_configuration.py --init")
|
os.system(
|
||||||
|
"./.venv/bin/python ./script/ide/pycharm_configuration.py --init"
|
||||||
|
)
|
||||||
|
|
||||||
def install_erplibre(self):
|
def install_erplibre(self):
|
||||||
self.execute_log.append(f"Dev installation")
|
self.execute_log.append(f"Dev installation")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue