Merge branch 'develop'

- support private makefile and csv pycharm importation
- add default module installation suggested by OCA
This commit is contained in:
Mathieu Benoit 2025-06-01 14:19:30 -04:00
commit 00976d766e
4 changed files with 160 additions and 111 deletions

View file

@ -42,7 +42,7 @@ endif
-include ./conf/make.todo.Makefile -include ./conf/make.todo.Makefile
# Include private Makefile # Include private Makefile
-include make.private.Makefile -include ./conf/make.private.Makefile
# Example for update # Example for update
.PHONY: custom_run_example .PHONY: custom_run_example

View file

@ -439,7 +439,20 @@
"mail_debrand", "mail_debrand",
"remove_odoo_enterprise", "remove_odoo_enterprise",
"web_responsive", "web_responsive",
"web_timeline" "web_timeline",
"server_action_mass_edit",
"base_name_search_improved",
"partner_firstname",
"web_search_with_and",
"web_listview_range_select",
"web_dialog_size",
"password_security",
"web_refresher",
"date_range",
"partner_contact_access_link",
"auditlog",
"queue_job",
"web_advanced_search"
] ]
} }
] ]
@ -456,6 +469,17 @@
} }
] ]
}, },
"odoo16.0_invoice_qc_ca": {
"base": "odoo16.0_base",
"disable": false,
"image_list": [
{
"module": [
"partner_manual_rank"
]
}
]
},
"odoo16.0_website_crm": { "odoo16.0_website_crm": {
"base": "odoo16.0_website", "base": "odoo16.0_website",
"disable": false, "disable": false,
@ -482,7 +506,8 @@
{ {
"module": [ "module": [
"l10n_ca", "l10n_ca",
"website_sale" "website_sale",
"partner_manual_rank"
] ]
} }
] ]
@ -500,7 +525,20 @@
"mail_debrand", "mail_debrand",
"remove_odoo_enterprise", "remove_odoo_enterprise",
"web_responsive", "web_responsive",
"web_timeline" "web_timeline",
"server_action_mass_edit",
"base_name_search_improved",
"partner_firstname",
"web_search_with_and",
"web_listview_range_select",
"web_dialog_size",
"password_security",
"web_refresher",
"date_range",
"partner_contact_access_link",
"auditlog",
"queue_job",
"web_advanced_search"
] ]
} }
] ]
@ -516,7 +554,8 @@
"mrp", "mrp",
"purchase_mrp", "purchase_mrp",
"hr_payroll_community", "hr_payroll_community",
"sale_mrp" "sale_mrp",
"partner_manual_rank"
] ]
} }
] ]
@ -554,6 +593,7 @@
"om_account_asset", "om_account_asset",
"om_account_budget", "om_account_budget",
"partner_statement", "partner_statement",
"partner_manual_rank",
"payment", "payment",
"plm", "plm",
"portal", "portal",

View file

@ -258,11 +258,11 @@ class GitTool:
""" """
lst_filter_group = filter_group.split(",") if filter_group else [] lst_filter_group = filter_group.split(",") if filter_group else []
manifest_file = self.get_manifest_file(repo_path=repo_path) manifest_file = self.get_manifest_file(repo_path=repo_path)
if manifest_file.startswith("/home/"): if os.path.isabs(manifest_file):
# This is a absolute path # This is a absolute path
filename = manifest_file filename = manifest_file
else: else:
filename = f"{repo_path}{manifest_file}" filename = os.path.normpath(os.path.join(repo_path, manifest_file))
lst_repo = [] lst_repo = []
with open(filename) as xml: with open(filename) as xml:
xml_as_string = xml.read() xml_as_string = xml.read()

View file

@ -9,6 +9,7 @@ import logging
import os import os
import subprocess import subprocess
import sys import sys
import io
import xmltodict import xmltodict
@ -31,6 +32,9 @@ VCS_WORKSPACE = os.path.join(IDEA_PATH, "vcs.xml")
PATH_EXCLUDE_FOLDER = "./conf/pycharm_exclude_folder.txt" PATH_EXCLUDE_FOLDER = "./conf/pycharm_exclude_folder.txt"
PATH_DEFAULT_CONFIGURATION = "./conf/pycharm_default_configuration.csv" PATH_DEFAULT_CONFIGURATION = "./conf/pycharm_default_configuration.csv"
PATH_DEFAULT_CONFIGURATION_PRIVATE = (
"./conf/pycharm_default_configuration.private.csv"
)
def get_config(): def get_config():
@ -315,7 +319,15 @@ def add_configuration(dct_xml, file_name, config):
_logger.error(f"Cannot read file '{PATH_DEFAULT_CONFIGURATION}'") _logger.error(f"Cannot read file '{PATH_DEFAULT_CONFIGURATION}'")
return has_change return has_change
with open(PATH_DEFAULT_CONFIGURATION) as txt: with open(PATH_DEFAULT_CONFIGURATION) as txt:
for default_conf in csv.DictReader(txt): content1 = txt.read()
if os.path.isfile(PATH_DEFAULT_CONFIGURATION_PRIVATE):
with open(PATH_DEFAULT_CONFIGURATION_PRIVATE) as txt:
content2 = txt.read()
merged_content = content1 + content2
else:
merged_content = content1
txt_merged = io.StringIO(merged_content)
for default_conf in csv.DictReader(txt_merged):
conf_name = default_conf.get("name") conf_name = default_conf.get("name")
conf_folder = default_conf.get("folder") conf_folder = default_conf.get("folder")
conf_script_path = default_conf.get("script_path") conf_script_path = default_conf.get("script_path")
@ -331,10 +343,7 @@ def add_configuration(dct_xml, file_name, config):
s_unique_key = ( s_unique_key = (
f"d {conf_folder} s {conf_script_path} p {conf_parameter}" f"d {conf_folder} s {conf_script_path} p {conf_parameter}"
) )
if ( if config.overwrite or s_unique_key not in lst_unique_configuration:
config.overwrite
or s_unique_key not in lst_unique_configuration
):
# add it! # add it!
if not config.overwrite and conf_name in lst_configuration: if not config.overwrite and conf_name in lst_configuration:
_logger.error( _logger.error(