From 95cce5d57c569b53be5aa6d3b9aecd25598b5999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20E=2E=20G=C3=B3mez?= Date: Wed, 12 Oct 2022 15:04:58 -0500 Subject: [PATCH] Replaces e-invoice repo with e-documents plus replacement --- apply_patches.sh | 19 +++++++++++-------- install_odoo_code.sh | 18 ++++++++++++++++-- ...dules.txt => rejected_vendor02_modules.txt | 1 + update_from_repo.sh | 13 ++++++------- 4 files changed, 34 insertions(+), 17 deletions(-) rename rejected_special_modules.txt => rejected_vendor02_modules.txt (82%) diff --git a/apply_patches.sh b/apply_patches.sh index ab47359..7580d98 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -12,12 +12,12 @@ DESTDIR=/opt/odoo Help () { - echo "Usage: $0 [-h] -o={all|core|vendor|special|community}" + echo "Usage: $0 [-h] -o={all|core|vendor|vendor02|community}" echo echo "Options:" echo "-h Help (display this text)" echo "-o Modules to be patched (one of 'all', 'core', 'vendor'," - echo " 'special', 'community'). Required." + echo " 'vendor02', 'community'). Required." echo } @@ -57,10 +57,10 @@ pt_vendor () } -pt_special () +pt_vendor02 () { echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - echo " Patch special electronic invoice modules" + echo " Patch electronic document modules" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" # Roll patch against 'special' repo (taken from 'vendor') @@ -69,14 +69,16 @@ pt_special () #patch $OPTIONS < patches/20210922_electronic-invoice-dian_changes-after-1-8.patch SRC=$PWD - DEST=$DESTDIR/v14-electronic-documents/ + DEST=$DESTDIR/vendor02/ OPTIONS="-p1 --verbose" pushd $DEST git apply $OPTIONS $SRC/patches/20220408_l10n-co-account-e-invoicing_fixes-dependencies.patch + # Re-roll: git apply $OPTIONS $SRC/patches/20211119_l10n-co-account-e-invoicing_fixes-off-by-one.patch git apply $OPTIONS $SRC/patches/20210908_l10n-co-base-location_ignore-country-state-city-data.patch - git apply $OPTIONS $SRC/patches/20210915_l10n-co-partner-person-type_fixes-depends.patch + # Moved to vendor01 replacement repo: + # git apply $OPTIONS $SRC/patches/20210915_l10n-co-partner-person-type_fixes-depends.patch popd # Just required for initial installation. Revert afterwards: @@ -113,6 +115,7 @@ pt_all () { pt_core # Apply patches to Odoo core pt_vendor # Apply patches to Avancys modules + pt_vendor02 # Apply patches to special Avancys modules pt_community # Apply patches to OCA modules } @@ -147,8 +150,8 @@ case $Modules in 'vendor') # Apply patches to Avancys modules pt_vendor exit;; - 'special') # Apply patches to e-invoice Avancys modules - pt_special + 'vendor02') # Apply patches to e-document Avancys modules + pt_vendor02 exit;; 'community') # Apply patches to OCA modules pt_community diff --git a/install_odoo_code.sh b/install_odoo_code.sh index a8181e9..9b09ce5 100755 --- a/install_odoo_code.sh +++ b/install_odoo_code.sh @@ -85,13 +85,27 @@ cp_vendor () echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" } +cp_vendor01 () +{ + REPO="Original e-invoice modules by Avancys" + SRC=./vendor01/ + DEST=$DESTDIR/vendor01/ + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + echo "Install $REPO into production directory structure" + echo "(selected modules)" + echo " …from $SRC to $DEST" + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + rsync $OPTIONS $EXCL $SRC $DEST + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +} + cp_vendor02 () { - REPO="Special Avancys v14 electronic invoice" + REPO="Avancys v14 electronic documents" SRC=./vendor02/ DEST=$DESTDIR/vendor02/ # Exclude modules/files already included in other repos: - EXCL="--exclude-from=rejected_special_modules.txt" + EXCL="--exclude-from=rejected_vendor02_modules.txt" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "Install $REPO into production directory structure" echo "(selected modules)" diff --git a/rejected_special_modules.txt b/rejected_vendor02_modules.txt similarity index 82% rename from rejected_special_modules.txt rename to rejected_vendor02_modules.txt index 7ed8945..fd46549 100644 --- a/rejected_special_modules.txt +++ b/rejected_vendor02_modules.txt @@ -1,2 +1,3 @@ requirements.txt account_invoice_force_number_extended +partner_coc diff --git a/update_from_repo.sh b/update_from_repo.sh index 4cf6d27..5df231f 100755 --- a/update_from_repo.sh +++ b/update_from_repo.sh @@ -59,7 +59,7 @@ gt_community () gt_vendor () { REPO="Avancys v14 for Agofer" - SRC=git@gitlab.com:mgarcia.avancys/v14_avancys_agofer.git + SRC=ssh://git@gitlab.com:mgarcia.avancys/v14_avancys_agofer.git DEST=./vendor/ OPTIONS="" if [ ! -d "$DEST" ]; then @@ -79,9 +79,8 @@ gt_vendor () gt_vendor01 () { - REPO="Special repo for electronic invoice 1.8 by Avancys" - SRC=git@gitlab.com:mgarcia.avancys/v14-facturacionelectronica.git - # ERROR: Repo was removed + REPO="Original electronic invoice modules by Avancys" + SRC=ssh://git@gitea.agofer.net:22001/jegomez/v14-facturacionelectronica.git DEST=./vendor01/ OPTIONS="" if [ ! -d "$DEST" ]; then @@ -101,7 +100,7 @@ gt_vendor01 () gt_vendor02 () { - REPO="Special repo for electronic documents by Avancys" + REPO="Electronic documents by Avancys" SRC=git@gitlab.com:mgarcia.avancys/v14-electronic-documents-agofer.git DEST=./vendor02/ OPTIONS="" @@ -183,10 +182,10 @@ case $Modules in 'vendor') # Download from repo Avancys modules gt_vendor exit;; - 'vendor01') # Repo was removed. Do not use + 'vendor01') # Download original e-invoice Avancys modules gt_vendor01 exit;; - 'vendor02') # Download from special repo Avancys e-invoice modules + 'vendor02') # Download from Avancys e-document modules gt_vendor02 exit;; 'custom') # Download from repo Custom modules developed in-house