[ADD] Modifies electronic invoice patch, unifies scripts

This commit is contained in:
Jorge Enrique Gómez Gómez 2021-09-08 15:27:30 -05:00
parent 84dd477a06
commit 2b29d76d05
6 changed files with 142 additions and 54 deletions

View File

@ -0,0 +1,3 @@
xades
pyopenssl
cryptography

View File

@ -12,20 +12,20 @@ DESTDIR=/opt/odoo
Help ()
{
echo "Usage: $0 [-h] -o={all|core|vendor|community}"
echo "Usage: $0 [-h] -o={all|core|vendor|special|community}"
echo
echo "Options:"
echo "-h Help (display this text)"
echo "-o Modules to be patched (one of 'all', 'core', 'vendor',"
echo " 'community'). Required."
echo " 'special', 'community'). Required."
echo
}
pt_core ()
{
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Patch core Odoo modules"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
DEST=$DESTDIR/core/addons/auth_oauth/
OPTIONS="--directory=$DEST --strip=1"
@ -35,9 +35,9 @@ pt_core ()
pt_vendor ()
{
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Patch vendor modules"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
DEST=$DESTDIR/vendor/electronic_invoice_dian/
OPTIONS="--directory=$DEST --strip=1"
@ -50,23 +50,23 @@ pt_vendor ()
pt_special ()
{
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Patch special electronic invoice modules"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
DEST=$DESTDIR/vendor/
OPTIONS="-p=1"
pushd $DEST
git apply $OPTIONS patches/20210820_l10n-co-account-e-invoicing_installs-in-production.patch
git apply $OPTIONS patches/20210908_l10n-co-account-e-invoicing_installs-in-production.patch
popd
}
pt_community ()
{
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Patch OCA modules"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
DEST=$DESTDIR/community/base_location/
OPTIONS="--directory=$DEST --strip=1"

View File

@ -13,12 +13,12 @@ OPTIONS="-av --exclude-from=common_exclude_patterns.txt --chown odoo:odoo"
Help ()
{
echo "Usage: $0 [-h] -o={all|core|community|vendor|custom}"
echo "Usage: $0 [-h] -o={all|core|community|vendor|special|custom}"
echo
echo "Options:"
echo "-h Help (display this text)"
echo "-o Modules to be installed (one of 'all', 'core', 'community', 'vendor',"
echo " 'custom'). Required."
echo "-o Modules to be installed (one of 'all', 'core', 'community',"
echo " 'vendor', 'special, 'custom'). Required."
echo
}
@ -27,10 +27,10 @@ cp_core ()
REPO="Odoo 14.0 core"
SRC=./core/
DEST=$DESTDIR/core/
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Install $REPO into production directory structure"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
rsync $OPTIONS $SRC $DEST
}
@ -39,14 +39,15 @@ cp_community ()
REPO="Modules by Odoo Community Association"
SRC=./community/oca
DEST=$DESTDIR/community/
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Install $REPO into production directory structure"
echo "(selected modules)"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
for i in $(cat selected_oca_modules.txt)
do rsync $OPTIONS $SRC/${i%/} $DEST
done
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
while read -r i || [ -n "$i" ]
do
rsync $OPTIONS "$SRC/${i%/}" $DEST
done < selected_oca_modules.txt
}
cp_vendor ()
@ -54,13 +55,13 @@ cp_vendor ()
REPO="Avancys v14 for Agofer"
SRC=./vendor/
DEST=$DESTDIR/vendor/
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Install $REPO into production directory structure"
echo "(selected modules)"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt \
$SRC $DEST
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
# Exclude proprietary modules, and modules included in other repos.
rsync $OPTIONS --exclude-from=rejected_vendor_modules.txt $SRC $DEST
}
cp_special ()
@ -68,12 +69,12 @@ cp_special ()
REPO="Special Avancys v14 electronic invoice"
SRC=./special/
DEST=$DESTDIR/vendor/
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Install $REPO into production directory structure"
echo "(selected modules)"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt \
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
rsync $OPTIONS --exclude-from=rejected_modules.txt \
$SRC $DEST
}
@ -82,10 +83,10 @@ cp_custom ()
REPO="Custom in-house modules "
SRC=./custom/
DEST=$DESTDIR/custom/
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Install $REPO into production directory structure"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
rsync $OPTIONS $SRC $DEST
}

View File

@ -0,0 +1,83 @@
diff --git a/l10n_co_account_e_invoicing/__manifest__.py b/l10n_co_account_e_invoicing/__manifest__.py
index 41934a0..77c4dbf 100644
--- a/l10n_co_account_e_invoicing/__manifest__.py
+++ b/l10n_co_account_e_invoicing/__manifest__.py
@@ -26,7 +26,7 @@
],
"external_dependencies": {
"python": [
- "OpenSSL",
+ "pyopenssl",
"xades",
],
},
diff --git a/l10n_co_account_e_invoicing/models/account_move.py b/l10n_co_account_e_invoicing/models/account_move.py
index 376f36c..88f62ba 100644
--- a/l10n_co_account_e_invoicing/models/account_move.py
+++ b/l10n_co_account_e_invoicing/models/account_move.py
@@ -89,16 +89,16 @@ class AccountMove(models.Model):
warn_remaining_certificate = fields.Boolean(
string="Warn About Remainings?",
- compute="_get_warn_certificate",
+ # compute="_get_warn_certificate",
store=False)
warn_inactive_certificate = fields.Boolean(
string="Warn About Inactive Certificate?",
- compute="_get_warn_certificate",
+ # compute="_get_warn_certificate",
store=False)
sequence_resolution_id = fields.Many2one(
comodel_name='ir.sequence.date_range',
string='Sequence Resolution',
- compute='_compute_sequence_resolution_id',
+ # compute='_compute_sequence_resolution_id',
store=False)
invoice_datetime = fields.Datetime(string='Invoice Datetime', copy=False)
delivery_datetime = fields.Datetime(string='Delivery Datetime', copy=False)
@@ -127,7 +127,11 @@ class AccountMove(models.Model):
string='Send Invoice to DIAN?',
default=_default_send_invoice_to_dian,
copy=False)
- dbname = fields.Char(string="DB Name", compute="_get_dbname", store=False)
+ dbname = fields.Char(
+ string="DB Name",
+ # compute="_get_dbname",
+ store=False
+ )
access_token = fields.Char(string='Access Token', copy=False)
is_accepted_rejected = fields.Boolean(string='Is Accepted/Rejected?', copy=False)
accepted_rejected_datetime = fields.Datetime(
diff --git a/l10n_co_account_move_discrepancy_response/__manifest__.py b/l10n_co_account_move_discrepancy_response/__manifest__.py
index 995ee1d..8d14c66 100644
--- a/l10n_co_account_move_discrepancy_response/__manifest__.py
+++ b/l10n_co_account_move_discrepancy_response/__manifest__.py
@@ -23,7 +23,7 @@
"wizards/account_move_reversal_views.xml",
"views/account_move_discrepancy_response_code_views.xml",
"views/account_move_views.xml",
- "views/account_journal_views.xml",
+ # "views/account_journal_views.xml",
],
"installable": True,
}
diff --git a/l10n_co_base_location/__manifest__.py b/l10n_co_base_location/__manifest__.py
index eed50a8..3729340 100644
--- a/l10n_co_base_location/__manifest__.py
+++ b/l10n_co_base_location/__manifest__.py
@@ -14,13 +14,13 @@
"account_avancys",
"base_location"],
"data": [
- "data/res.country.state.csv",
- #"data/res.city.csv",
- #"data/res.city.zip.csv",
+ # "data/res.country.state.csv",
+ # "data/res.city.csv",
+ # "data/res.city.zip.csv",
"views/res_country_state_views.xml",
"views/res_city_views.xml",
"views/res_city_zip_views.xml",
"views/res_partner_views.xml"
],
"installable": True,

View File

@ -1,3 +1,4 @@
account_accountant
mail_enterprise
web_mobile
electronic_invoice_dian

View File

@ -5,12 +5,12 @@
Help ()
{
echo "Usage: $0 [-h] -o={all|core|community|vendor|custom}"
echo "Usage: $0 [-h] -o={all|core|community|vendor|special|custom}"
echo
echo "Options:"
echo "-h Help (display this text)"
echo "-o Repositories to be updated (one of 'all', 'core', 'community', 'vendor',"
echo " 'custom'). Required."
echo "-o Repositories to be updated (one of 'all', 'core', 'community',"
echo " 'vendor', 'special, 'custom'). Required."
echo
}
@ -21,16 +21,16 @@ gt_core ()
DEST=./core/
OPTIONS="--single-branch --depth 1 --branch 14.0"
if [ ! -d "$DEST" ]; then
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Clone $REPO"
echo " …to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git clone $OPTIONS $SRC $DEST
else
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Update $REPO"
echo " …in $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git -C $DEST pull
fi
}
@ -42,16 +42,16 @@ gt_community ()
DEST=./community/
OPTIONS="--recurse-submodules"
if [ ! -d "$DEST" ]; then
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Clone $REPO"
echo " …to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git clone $OPTIONS $SRC $DEST
else
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Update $REPO"
echo " …in $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git -C $DEST pull $OPTIONS
fi
}
@ -63,16 +63,16 @@ gt_vendor ()
DEST=./vendor/
OPTIONS=""
if [ ! -d "$DEST" ]; then
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Clone $REPO"
echo " …to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git clone $OPTIONS $SRC $DEST
else
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Update $REPO"
echo " …in $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git -C $DEST pull
fi
}
@ -84,16 +84,16 @@ gt_special ()
DEST=./special/
OPTIONS=""
if [ ! -d "$DEST" ]; then
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Clone $REPO"
echo " …to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git clone $OPTIONS $SRC $DEST
else
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Update $REPO"
echo " …in $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git -C $DEST pull
fi
}
@ -105,16 +105,16 @@ gt_custom ()
DEST=./custom/
OPTIONS=""
if [ ! -d "$DEST" ]; then
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Clone $REPO"
echo " …to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git clone $OPTIONS $SRC $DEST
else
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Update $REPO"
echo " …in $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
git -C $DEST pull
fi
}