Move helpdesk, fix script fork, add missing module in ERPLibre and santelibre

This commit is contained in:
Mathieu Benoit 2020-04-25 01:10:49 -04:00
parent 524b557b26
commit 7262056222
13 changed files with 119 additions and 76 deletions

7
DEVELOPMENT.md Normal file
View 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
View 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
View 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

View file

@ -64,64 +64,64 @@ def main():
for a in lst_repo] for a in lst_repo]
i = 0 i = 0
total = len(lst_repo) total = len(lst_repo)
# for repo in lst_repo: for repo in lst_repo:
# i += 1 i += 1
# print(f"Nb element {i}/{total}") print(f"Nb element {i}/{total}")
# url = repo.get("url") url = repo.get("url")
#
# try: try:
# working_repo = Repo(repo.get("relative_path")) working_repo = Repo(repo.get("relative_path"))
# except git.exc.NoSuchPathError: except git.exc.NoSuchPathError:
# # Check to fork # Check to fork
# # repo_info = git_tool.get_transformed_repo_info_from_url( # repo_info = git_tool.get_transformed_repo_info_from_url(
# # url, organization_force="ERPLibre", # url, organization_force="ERPLibre",
# # is_submodule=repo.get("is_submodule"), # is_submodule=repo.get("is_submodule"),
# # sub_path=repo.get("sub_path")) # sub_path=repo.get("sub_path"))
# git_tool.fork_repo(upstream_url=url, git_tool.fork_repo(upstream_url=url,
# github_token=github_token, github_token=github_token,
# organization_name="ERPLibre") organization_name="ERPLibre")
# repo_info = git_tool.get_transformed_repo_info_from_url( repo_info = git_tool.get_transformed_repo_info_from_url(
# url, organization_force=organization_name, url, organization_force=organization_name,
# is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path")) is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path"))
# git_tool.fork_repo(upstream_url=url, git_tool.fork_repo(upstream_url=url,
# github_token=github_token, github_token=github_token,
# organization_name=organization_name) organization_name=organization_name)
#
# git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo) git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo)
# continue continue
#
# dct_remote_name = {a.name: a for a in working_repo.remotes} dct_remote_name = {a.name: a for a in working_repo.remotes}
# remote_origin = dct_remote_name.get("origin") remote_origin = dct_remote_name.get("origin")
# remote_erplibre = dct_remote_name.get("ERPLibre") remote_erplibre = dct_remote_name.get("ERPLibre")
# remote_organization = dct_remote_name.get(organization_name) remote_organization = dct_remote_name.get(organization_name)
#
# if not config.skip_fork: if not config.skip_fork:
# if not remote_erplibre: if not remote_erplibre:
# repo_info = git_tool.get_transformed_repo_info_from_url( repo_info = git_tool.get_transformed_repo_info_from_url(
# url, organization_force="ERPLibre", url, organization_force="ERPLibre",
# is_submodule=repo.get("is_submodule"), is_submodule=repo.get("is_submodule"),
# sub_path=repo.get("sub_path")) sub_path=repo.get("sub_path"))
# git_tool.add_and_fetch_remote(repo_info) git_tool.add_and_fetch_remote(repo_info)
#
# git_tool.fork_repo(url, github_token, git_tool.fork_repo(url, github_token,
# organization_name=organization_name, organization_name=organization_name,
# ) )
#
# repo_info = git_tool.get_transformed_repo_info_from_url( repo_info = git_tool.get_transformed_repo_info_from_url(
# url, organization_force=organization_name, url, organization_force=organization_name,
# is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path")) is_submodule=repo.get("is_submodule"), sub_path=repo.get("sub_path"))
# if remote_origin: if remote_origin:
# working_repo.git.remote("remove", "origin") working_repo.git.remote("remove", "origin")
# repo_info.organization = "origin" repo_info.organization = "origin"
# try: try:
# git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo) git_tool.add_and_fetch_remote(repo_info, root_repo=root_repo)
# except Exception as e: except Exception as e:
# print(e) print(e)
# if config.force and remote_organization: if config.force and remote_organization:
# working_repo.git.remote("remove", organization_name) working_repo.git.remote("remove", organization_name)
#
# repo_info.organization = organization_name repo_info.organization = organization_name
# git_tool.add_and_fetch_remote(repo_info) git_tool.add_and_fetch_remote(repo_info)
# Update origin to new repo # Update origin to new repo
git_tool.generate_git_modules(lst_repo_organization, repo_path=config.dir) git_tool.generate_git_modules(lst_repo_organization, repo_path=config.dir)

View file

@ -8,7 +8,7 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
################################################################################ ################################################################################
. ../env_var.sh . ./env_var.sh
#OE_USER="odoo" #OE_USER="odoo"
#OE_HOME="/${OE_USER}/odoo" #OE_HOME="/${OE_USER}/odoo"

View file

@ -8,7 +8,7 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
################################################################################ ################################################################################
. ../env_var.sh . ./env_var.sh
OE_USER=$(whoami) OE_USER=$(whoami)
# The default port where this Odoo instance will run under (provided you use the command -c in the terminal) # The default port where this Odoo instance will run under (provided you use the command -c in the terminal)

View file

@ -4,19 +4,19 @@
# Author: Alexandre Ferreira Benevides # Author: Alexandre Ferreira Benevides
################################################################################ ################################################################################
. ../env_var.sh . ./env_var.sh
if [[ "${OSTYPE}" == "linux-gnu" ]]; then if [[ "${OSTYPE}" == "linux-gnu" ]]; then
OS=$(lsb_release -si) OS=$(lsb_release -si)
if [[ "${OS}" == "Ubuntu" ]]; then if [[ "${OS}" == "Ubuntu" ]]; then
echo "\n---- linux-gnu installation process started ----" echo "\n---- linux-gnu installation process started ----"
./odoo_install_debian_dependancy.sh ./script/odoo_install_debian_dependancy.sh
./odoo_install_locally.sh ./script/odoo_install_locally.sh
else else
echo "Your Linux system is not supported." echo "Your Linux system is not supported."
fi fi
elif [[ "${OSTYPE}" == "darwin"* ]]; then elif [[ "${OSTYPE}" == "darwin"* ]]; then
echo "\n---- Darwin installation process started ----" echo "\n---- Darwin installation process started ----"
./odoo_install_OSX_dependancy.sh ./script/odoo_install_OSX_dependancy.sh
./odoo_install_locally.sh ./script/odoo_install_locally.sh
fi fi

View file

@ -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 ----" echo -e "\n---- Create ODOO system user ----"
sudo adduser --system --quiet --shell=/bin/bash --home=/${OE_USER} --gecos 'ODOO' --group ${OE_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` REMOTE_URL_GIT=`git remote get-url origin`
BRANCH_GIT=`git rev-parse --abbrev-ref HEAD` 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 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 sudo chown -R ${OE_USER}:${OE_USER} ${OE_HOME_ODOO}/env_var.sh
LAST_PWD=$PWD LAST_PWD=$PWD
cd ${OE_HOME_ODOO} 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} cd ${LAST_PWD}
#echo -e "\n* Updating server config file" #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" #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 # Adding ODOO as a daemon
#-------------------------------------------------- #--------------------------------------------------
./odoo_install_daemon.sh ./script/odoo_install_daemon.sh
#-------------------------------------------------- #--------------------------------------------------
# Install Nginx if needed # Install Nginx if needed
#-------------------------------------------------- #--------------------------------------------------
./odoo_install_production_nginx.sh ./script/odoo_install_production_nginx.sh

View file

@ -8,7 +8,7 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
################################################################################ ################################################################################
. ../env_var.sh . ./env_var.sh
#-------------------------------------------------- #--------------------------------------------------
# Install Nginx if needed # Install Nginx if needed