Move helpdesk, fix script fork, add missing module in ERPLibre and santelibre
This commit is contained in:
parent
524b557b26
commit
7262056222
13 changed files with 119 additions and 76 deletions
7
DEVELOPMENT.md
Normal file
7
DEVELOPMENT.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# ERPLibre
|
||||
|
||||
## Move database prod to dev
|
||||
|
||||
When moving database prod to your dev environment, you want to remove email servers, and install user test to test the database.
|
||||
Run :
|
||||
> -c config.conf --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
||||
29
MIGRATION.md
Normal file
29
MIGRATION.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# ERPLibre
|
||||
|
||||
## Migration procedure production
|
||||
|
||||
TODO
|
||||
|
||||
## Migration procedure dev
|
||||
|
||||
Example :
|
||||
|
||||
update module helpdesk_mgmt and helpdesk_join_team
|
||||
|
||||
update translation all
|
||||
|
||||
Remove helpdesk_res_partner_team
|
||||
|
||||
Delete module not found
|
||||
|
||||
smile_upgrade?
|
||||
|
||||
update html categorie_id
|
||||
|
||||
join_team == 6
|
||||
|
||||
servicecall == 1
|
||||
|
||||
--limit-time-real 99999 -c config.conf --stop-after-init -d santelibre -i helpdesk_mrp -i erplibre_base_enterprise_mrp,erplibre_base_hackaton,helpdesk_mgmt -u helpdesk_join_team
|
||||
|
||||
--limit-time-real 99999 -c config.conf --stop-after-init -d santelibre -u helpdesk_join_team
|
||||
7
PRODUCTION.md
Normal file
7
PRODUCTION.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# ERPLibre
|
||||
|
||||
## Move database prod to dev
|
||||
|
||||
When moving database prod to your dev environment, you want to remove email servers, and install user test to test the database.
|
||||
Run :
|
||||
> -c config.conf --stop-after-init -i user_test,disable_mail_server --dev all -d DATABASE
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2ae1a1f78563fd4dbe7be21909d3d50db9e5fca2
|
||||
Subproject commit e68263793556cc0ec0af91be612421613b5cf7a2
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit b295952e5c108833477b3c96b5f84a782f9015bc
|
||||
Subproject commit 745cb2ec3df909e6f3622b4ef19971e6e83b46b5
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit b53696d21efbda2ae9ca97bcd529e89d79e3efb4
|
||||
Subproject commit e138dedeba840b2e296c3d697f142c4d70ca7378
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 937032a1fc19f56d1646fe24bea72693d9c8b814
|
||||
Subproject commit ee94058aecee418b3652864f23b54a86ba0f92f4
|
||||
|
|
@ -64,64 +64,64 @@ def main():
|
|||
for a in lst_repo]
|
||||
i = 0
|
||||
total = len(lst_repo)
|
||||
# for repo in lst_repo:
|
||||
# i += 1
|
||||
# print(f"Nb element {i}/{total}")
|
||||
# url = repo.get("url")
|
||||
#
|
||||
# try:
|
||||
# working_repo = Repo(repo.get("relative_path"))
|
||||
# except git.exc.NoSuchPathError:
|
||||
# # Check to fork
|
||||
# # repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
# # url, organization_force="ERPLibre",
|
||||
# # is_submodule=repo.get("is_submodule"),
|
||||
# # sub_path=repo.get("sub_path"))
|
||||
# git_tool.fork_repo(upstream_url=url,
|
||||
# github_token=github_token,
|
||||
# organization_name="ERPLibre")
|
||||
# repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
# url, organization_force=organization_name,
|
||||
# is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path"))
|
||||
# git_tool.fork_repo(upstream_url=url,
|
||||
# github_token=github_token,
|
||||
# organization_name=organization_name)
|
||||
#
|
||||
# git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo)
|
||||
# continue
|
||||
#
|
||||
# dct_remote_name = {a.name: a for a in working_repo.remotes}
|
||||
# remote_origin = dct_remote_name.get("origin")
|
||||
# remote_erplibre = dct_remote_name.get("ERPLibre")
|
||||
# remote_organization = dct_remote_name.get(organization_name)
|
||||
#
|
||||
# if not config.skip_fork:
|
||||
# if not remote_erplibre:
|
||||
# repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
# url, organization_force="ERPLibre",
|
||||
# is_submodule=repo.get("is_submodule"),
|
||||
# sub_path=repo.get("sub_path"))
|
||||
# git_tool.add_and_fetch_remote(repo_info)
|
||||
#
|
||||
# git_tool.fork_repo(url, github_token,
|
||||
# organization_name=organization_name,
|
||||
# )
|
||||
#
|
||||
# repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
# url, organization_force=organization_name,
|
||||
# is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path"))
|
||||
# if remote_origin:
|
||||
# working_repo.git.remote("remove", "origin")
|
||||
# repo_info.organization = "origin"
|
||||
# try:
|
||||
# git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo)
|
||||
# except Exception as e:
|
||||
# print(e)
|
||||
# if config.force and remote_organization:
|
||||
# working_repo.git.remote("remove", organization_name)
|
||||
#
|
||||
# repo_info.organization = organization_name
|
||||
# git_tool.add_and_fetch_remote(repo_info)
|
||||
for repo in lst_repo:
|
||||
i += 1
|
||||
print(f"Nb element {i}/{total}")
|
||||
url = repo.get("url")
|
||||
|
||||
try:
|
||||
working_repo = Repo(repo.get("relative_path"))
|
||||
except git.exc.NoSuchPathError:
|
||||
# Check to fork
|
||||
# repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
# url, organization_force="ERPLibre",
|
||||
# is_submodule=repo.get("is_submodule"),
|
||||
# sub_path=repo.get("sub_path"))
|
||||
git_tool.fork_repo(upstream_url=url,
|
||||
github_token=github_token,
|
||||
organization_name="ERPLibre")
|
||||
repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
url, organization_force=organization_name,
|
||||
is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path"))
|
||||
git_tool.fork_repo(upstream_url=url,
|
||||
github_token=github_token,
|
||||
organization_name=organization_name)
|
||||
|
||||
git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo)
|
||||
continue
|
||||
|
||||
dct_remote_name = {a.name: a for a in working_repo.remotes}
|
||||
remote_origin = dct_remote_name.get("origin")
|
||||
remote_erplibre = dct_remote_name.get("ERPLibre")
|
||||
remote_organization = dct_remote_name.get(organization_name)
|
||||
|
||||
if not config.skip_fork:
|
||||
if not remote_erplibre:
|
||||
repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
url, organization_force="ERPLibre",
|
||||
is_submodule=repo.get("is_submodule"),
|
||||
sub_path=repo.get("sub_path"))
|
||||
git_tool.add_and_fetch_remote(repo_info)
|
||||
|
||||
git_tool.fork_repo(url, github_token,
|
||||
organization_name=organization_name,
|
||||
)
|
||||
|
||||
repo_info = git_tool.get_transformed_repo_info_from_url(
|
||||
url, organization_force=organization_name,
|
||||
is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path"))
|
||||
if remote_origin:
|
||||
working_repo.git.remote("remove", "origin")
|
||||
repo_info.organization = "origin"
|
||||
try:
|
||||
git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
if config.force and remote_organization:
|
||||
working_repo.git.remote("remove", organization_name)
|
||||
|
||||
repo_info.organization = organization_name
|
||||
git_tool.add_and_fetch_remote(repo_info)
|
||||
|
||||
# Update origin to new repo
|
||||
git_tool.generate_git_modules(lst_repo_organization, repo_path=config.dir)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
################################################################################
|
||||
|
||||
. ../env_var.sh
|
||||
. ./env_var.sh
|
||||
|
||||
#OE_USER="odoo"
|
||||
#OE_HOME="/${OE_USER}/odoo"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
################################################################################
|
||||
|
||||
. ../env_var.sh
|
||||
. ./env_var.sh
|
||||
|
||||
OE_USER=$(whoami)
|
||||
# The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@
|
|||
# Author: Alexandre Ferreira Benevides
|
||||
################################################################################
|
||||
|
||||
. ../env_var.sh
|
||||
. ./env_var.sh
|
||||
|
||||
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
|
||||
OS=$(lsb_release -si)
|
||||
if [[ "${OS}" == "Ubuntu" ]]; then
|
||||
echo "\n---- linux-gnu installation process started ----"
|
||||
./odoo_install_debian_dependancy.sh
|
||||
./odoo_install_locally.sh
|
||||
./script/odoo_install_debian_dependancy.sh
|
||||
./script/odoo_install_locally.sh
|
||||
else
|
||||
echo "Your Linux system is not supported."
|
||||
fi
|
||||
elif [[ "${OSTYPE}" == "darwin"* ]]; then
|
||||
echo "\n---- Darwin installation process started ----"
|
||||
./odoo_install_OSX_dependancy.sh
|
||||
./odoo_install_locally.sh
|
||||
./script/odoo_install_OSX_dependancy.sh
|
||||
./script/odoo_install_locally.sh
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
################################################################################
|
||||
|
||||
. ../env_var.sh
|
||||
. ./env_var.sh
|
||||
|
||||
./odoo_install_debian_dependancy.sh
|
||||
./script/odoo_install_debian_dependancy.sh
|
||||
|
||||
echo -e "\n---- Create ODOO system user ----"
|
||||
sudo adduser --system --quiet --shell=/bin/bash --home=/${OE_USER} --gecos 'ODOO' --group ${OE_USER}
|
||||
|
|
@ -35,12 +35,12 @@ echo -e "\n==== Clone this installation ===="
|
|||
REMOTE_URL_GIT=`git remote get-url origin`
|
||||
BRANCH_GIT=`git rev-parse --abbrev-ref HEAD`
|
||||
sudo su ${OE_USER} -c "git clone --branch ${BRANCH_GIT} ${REMOTE_URL_GIT} ${OE_HOME_ODOO}"
|
||||
sudo cp ../env_var.sh ${OE_HOME_ODOO}
|
||||
sudo cp ./env_var.sh ${OE_HOME_ODOO}
|
||||
sudo chown -R ${OE_USER}:${OE_USER} ${OE_HOME_ODOO}/env_var.sh
|
||||
|
||||
LAST_PWD=$PWD
|
||||
cd ${OE_HOME_ODOO}
|
||||
sudo su ${OE_USER} -c "./odoo_install_locally.sh"
|
||||
sudo su ${OE_USER} -c "./script/odoo_install_locally.sh"
|
||||
cd ${LAST_PWD}
|
||||
#echo -e "\n* Updating server config file"
|
||||
#sudo su ${OE_USER} -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /${OE_USER}/odoo/config.conf"
|
||||
|
|
@ -48,9 +48,9 @@ cd ${LAST_PWD}
|
|||
#--------------------------------------------------
|
||||
# Adding ODOO as a daemon
|
||||
#--------------------------------------------------
|
||||
./odoo_install_daemon.sh
|
||||
./script/odoo_install_daemon.sh
|
||||
|
||||
#--------------------------------------------------
|
||||
# Install Nginx if needed
|
||||
#--------------------------------------------------
|
||||
./odoo_install_production_nginx.sh
|
||||
./script/odoo_install_production_nginx.sh
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
################################################################################
|
||||
|
||||
. ../env_var.sh
|
||||
. ./env_var.sh
|
||||
|
||||
#--------------------------------------------------
|
||||
# Install Nginx if needed
|
||||
|
|
|
|||
Loading…
Reference in a new issue