From a188f31090f21a3a8e2eef370abee13b0ce4ca61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20E=2E=20G=C3=B3mez?= Date: Wed, 1 Dec 2021 22:41:36 -0500 Subject: [PATCH] [FIX] Update patches to recent code changes --- apply_patches.sh | 24 +- install_odoo_code.sh | 2 +- ...nvoice-dian_remove-enterprise-module.patch | 13 -- ...onic-invoice-dian_sudo-in-email-sent.patch | 12 - ...t-e-invoicing_installs-in-production.patch | 211 ------------------ ...count-e-invoicing_fixes-dependencies.patch | 13 ++ ...t-e-invoicing_installs-in-production.patch | 83 ------- ..._remove-computes-for-initial-install.patch | 31 +++ ...ation_ignore-country-state-city-data.patch | 13 ++ ...co-partner-person-type_fixes-depends.patch | 7 +- ...ccount-e-invoicing_fixes-off-by-one.patch} | 2 +- 11 files changed, 74 insertions(+), 337 deletions(-) delete mode 100644 patches/20210607_electronic-invoice-dian_remove-enterprise-module.patch delete mode 100644 patches/20210817_electronic-invoice-dian_sudo-in-email-sent.patch delete mode 100644 patches/20210820_l10n-co-account-e-invoicing_installs-in-production.patch create mode 100644 patches/20210908_l10n-co-account-e-invoicing_fixes-dependencies.patch delete mode 100644 patches/20210908_l10n-co-account-e-invoicing_installs-in-production.patch create mode 100644 patches/20210908_l10n-co-account-e-invoicing_remove-computes-for-initial-install.patch create mode 100644 patches/20210908_l10n-co-base-location_ignore-country-state-city-data.patch rename patches/{20211119_l10n-co-account-e-invoicing_off-by-one-error.patch => 20211119_l10n-co-account-e-invoicing_fixes-off-by-one.patch} (87%) diff --git a/apply_patches.sh b/apply_patches.sh index 375c783..c771679 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -43,11 +43,6 @@ pt_vendor () OPTIONS="--directory=$DEST --strip=1" patch $OPTIONS < patches/20210922_electronic-invoice-dian_changes-after-1-8.patch - - # Rolled-up in current patch: - # 20210607_electronic-invoice-dian_remove-enterprise-module.patch - # 20210817_electronic-invoice-dian_sudo-in-email-sent.patch - # Changes made in v14-facturacionelectronica branch } pt_special () @@ -56,18 +51,21 @@ pt_special () echo " Patch special electronic invoice modules" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - DEST=$DESTDIR/vendor/ - OPTIONS="-p=1" + SRC=$PWD + DEST=$DESTDIR/v14-electronic-documents/ + OPTIONS="-p1 --verbose" pushd $DEST - git apply $OPTIONS patches/20210908_l10n-co-account-e-invoicing_installs-in-production.patch - git apply $OPTIONS patches/20211119_l10n-co-account-e-invoicing_off-by-one-error.patch + git apply $OPTIONS $SRC/patches/20210908_l10n-co-account-e-invoicing_fixes-dependencies.patch + git apply $OPTIONS $SRC/patches/20210908_l10n-co-base-location_ignore-country-state-city-data.patch + git apply $OPTIONS $SRC/patches/20211119_l10n-co-account-e-invoicing_fixes-off-by-one.patch + git apply $OPTIONS $SRC/patches/20210915_l10n-co-partner-person-type_fixes-depends.patch popd - # Fixed in origin: - # DEST=$DESTDIR/v14-facturacionelectronica/l10n_co_partner_person_type/ - # OPTIONS="--directory=$DEST --strip=1" - # patch $OPTIONS < patches/20210915_l10n-co-partner-person-type_fixes-depends.patch + # Just required for initial installation. Revert afterwards: + # pushd $DEST + # git apply $OPTIONS patches/20210908_l10n-co-account-e-invoicing_remove-computes-for-initial-install.patch + # popd } pt_community () diff --git a/install_odoo_code.sh b/install_odoo_code.sh index 10023ce..49177df 100755 --- a/install_odoo_code.sh +++ b/install_odoo_code.sh @@ -82,7 +82,7 @@ cp_special () { REPO="Special Avancys v14 electronic invoice" SRC=./special/ - DEST=$DESTDIR/vendor/ + DEST=$DESTDIR/v14-electronic-documents/ # Exclude modules included in other repos: EXCL="--exclude-from=rejected_special_modules.txt" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" diff --git a/patches/20210607_electronic-invoice-dian_remove-enterprise-module.patch b/patches/20210607_electronic-invoice-dian_remove-enterprise-module.patch deleted file mode 100644 index ba237e2..0000000 --- a/patches/20210607_electronic-invoice-dian_remove-enterprise-module.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -rupN electronic_invoice_dian/__manifest__.py electronic_invoice_dian.patch/__manifest__.py ---- electronic_invoice_dian/__manifest__.py 2021-06-07 23:04:35.643425564 -0500 -+++ electronic_invoice_dian.patch/__manifest__.py 2021-06-07 23:05:55.911942965 -0500 -@@ -12,8 +12,8 @@ - 'website': "http://www.avancys.com", - 'category': 'Accounting/Accounting', - 'version': '14.0.0.0', - 'depends': ['account', 'sale'], -- 'license': 'OEEL-1', -+ 'license': '', - 'installable': True, - 'data': [ - 'data/data.xml', diff --git a/patches/20210817_electronic-invoice-dian_sudo-in-email-sent.patch b/patches/20210817_electronic-invoice-dian_sudo-in-email-sent.patch deleted file mode 100644 index fd8f2eb..0000000 --- a/patches/20210817_electronic-invoice-dian_sudo-in-email-sent.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN electronic_invoice_dian/models/account_move.py electronic_invoice_dian.patch/models/account_move.py ---- electronic_invoice_dian/models/account_move.py 2021-07-01 17:18:28.506355243 -0500 -+++ electronic_invoice_dian.patch/models/account_move.py 2021-08-18 00:05:11.094308447 -0500 -@@ -642,7 +642,7 @@ class AccountMove(models.Model): - continue - email_pool = email_pool + email - invoice.create_transaction_log(invoice, 'email_sent', 'OK') -- invoice.ei_email_sent = True -+ invoice.sudo().ei_email_sent = True - if force_send: - email_pool.send() - diff --git a/patches/20210820_l10n-co-account-e-invoicing_installs-in-production.patch b/patches/20210820_l10n-co-account-e-invoicing_installs-in-production.patch deleted file mode 100644 index f94bcc1..0000000 --- a/patches/20210820_l10n-co-account-e-invoicing_installs-in-production.patch +++ /dev/null @@ -1,211 +0,0 @@ -diff --git a/account_tax_group_type/i18n/es_CO.po b/account_tax_group_type/i18n/es_CO.po -deleted file mode 100644 -index 55fa157..0000000 ---- a/account_tax_group_type/i18n/es_CO.po -+++ /dev/null -@@ -1,110 +0,0 @@ --# Translation of Odoo Server. --# This file contains the translation of the following modules: --# * account_tax_group_type --# --msgid "" --msgstr "" --"Project-Id-Version: Odoo Server 14.0\n" --"Report-Msgid-Bugs-To: \n" --"POT-Creation-Date: 2021-08-20 14:04+0000\n" --"PO-Revision-Date: 2021-08-20 14:04+0000\n" --"Last-Translator: \n" --"Language-Team: \n" --"MIME-Version: 1.0\n" --"Content-Type: text/plain; charset=UTF-8\n" --"Content-Transfer-Encoding: \n" --"Plural-Forms: \n" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__code --msgid "Code" --msgstr "Código" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__create_uid --msgid "Created by" --msgstr "Creado por" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__create_date --msgid "Created on" --msgstr "Creado el" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__description --msgid "Description" --msgstr "Descripción" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group__display_name --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__display_name --msgid "Display Name" --msgstr "Nombre mostrado" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group__id --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__id --msgid "ID" --msgstr "" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group____last_update --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type____last_update --msgid "Last Modified on" --msgstr "Última modificación el" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__write_uid --msgid "Last Updated by" --msgstr "Última actualización por" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__write_date --msgid "Last Updated on" --msgstr "Última actualización el" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__name --msgid "Name" --msgstr "Nombre" -- --#. module: account_tax_group_type --#: model:ir.model.fields.selection,name:account_tax_group_type.selection__account_tax_group_type__type__tax --msgid "Tax" --msgstr "Impuesto" -- --#. module: account_tax_group_type --#: model:ir.model,name:account_tax_group_type.model_account_tax_group --msgid "Tax Group" --msgstr "Grupo de impuestos" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group__tax_group_type_id --msgid "Tax Group Type" --msgstr "Tipo de Grupo de Impuesto" -- --#. module: account_tax_group_type --#: model:ir.model,name:account_tax_group_type.model_account_tax_group_type --msgid "Tax Group Types" --msgstr "Tipos de Grupos de Impuestos" -- --#. module: account_tax_group_type --#: code:addons/account_tax_group_type/models/account_tax_group_type.py:0 --#, python-format --msgid "The code of Tax Group Type must be unique!" --msgstr "¡El código del Tipo de Grupo Impuesto debe ser único!" -- --#. module: account_tax_group_type --#: model:ir.model.fields,field_description:account_tax_group_type.field_account_tax_group_type__type --msgid "Type" --msgstr "Tipo" -- --#. module: account_tax_group_type --#: model:ir.model.fields.selection,name:account_tax_group_type.selection__account_tax_group_type__type__withholding_tax --msgid "Withholding Tax" --msgstr "Impuesto de Retención" -- --#. module: account_tax_group_type --#: model:ir.model.constraint,message:account_tax_group_type.constraint_account_tax_group_type_code_uniq --msgid "The code of Tax Group Type must be unique!" --msgstr "¡El código del Tipo de Grupo Impuesto debe ser único!" -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, --} -\ No newline at end of file -+} -diff --git a/requirements.txt b/requirements.txt -new file mode 100644 -index 0000000..d31443f ---- /dev/null -+++ b/requirements.txt -@@ -0,0 +1,3 @@ -+xades -+cryptography==3.3.2 -+pyopenssl==17.5.0 diff --git a/patches/20210908_l10n-co-account-e-invoicing_fixes-dependencies.patch b/patches/20210908_l10n-co-account-e-invoicing_fixes-dependencies.patch new file mode 100644 index 0000000..50b54e9 --- /dev/null +++ b/patches/20210908_l10n-co-account-e-invoicing_fixes-dependencies.patch @@ -0,0 +1,13 @@ +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/patches/20210908_l10n-co-account-e-invoicing_installs-in-production.patch b/patches/20210908_l10n-co-account-e-invoicing_installs-in-production.patch deleted file mode 100644 index 403c47c..0000000 --- a/patches/20210908_l10n-co-account-e-invoicing_installs-in-production.patch +++ /dev/null @@ -1,83 +0,0 @@ -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, diff --git a/patches/20210908_l10n-co-account-e-invoicing_remove-computes-for-initial-install.patch b/patches/20210908_l10n-co-account-e-invoicing_remove-computes-for-initial-install.patch new file mode 100644 index 0000000..3c4b275 --- /dev/null +++ b/patches/20210908_l10n-co-account-e-invoicing_remove-computes-for-initial-install.patch @@ -0,0 +1,31 @@ +diff --git a/l10n_co_account_e_invoicing/models/account_move.py b/l10n_co_account_e_invoicing/models/account_move.py +index ff2ca84..350cdc0 100644 +--- a/l10n_co_account_e_invoicing/models/account_move.py ++++ b/l10n_co_account_e_invoicing/models/account_move.py +@@ -110,18 +110,21 @@ class AccountMove(models.Model): + + warn_remaining_certificate = fields.Boolean( + string="Warn About Remainings?", +- compute="_compute_warn_certificate", ++ # compute="_compute_warn_certificate", + store=False) + warn_inactive_certificate = fields.Boolean( + string="Warn About Inactive Certificate?", +- compute="_compute_warn_certificate", ++ # compute="_compute_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) ++ dbname = fields.Char( ++ string="DB Name", ++ # compute="_compute_dbname", + store=False) +- dbname = fields.Char(string="DB Name", compute="_compute_dbname", store=False) + invoice_datetime = fields.Datetime(string='Invoice Datetime', copy=False) + delivery_datetime = fields.Datetime(string='Delivery Datetime', copy=False) + operation_type = fields.Selection( + diff --git a/patches/20210908_l10n-co-base-location_ignore-country-state-city-data.patch b/patches/20210908_l10n-co-base-location_ignore-country-state-city-data.patch new file mode 100644 index 0000000..545d1ef --- /dev/null +++ b/patches/20210908_l10n-co-base-location_ignore-country-state-city-data.patch @@ -0,0 +1,13 @@ +diff --git a/l10n_co_base_location/__manifest__.py b/l10n_co_base_location/__manifest__.py +index ec81efd..3729340 100644 +--- a/l10n_co_base_location/__manifest__.py ++++ b/l10n_co_base_location/__manifest__.py +@@ -14,7 +14,7 @@ + "account_avancys", + "base_location"], + "data": [ +- "data/res.country.state.csv", ++ # "data/res.country.state.csv", + # "data/res.city.csv", + # "data/res.city.zip.csv", + "views/res_country_state_views.xml", diff --git a/patches/20210915_l10n-co-partner-person-type_fixes-depends.patch b/patches/20210915_l10n-co-partner-person-type_fixes-depends.patch index 196591d..3db9646 100644 --- a/patches/20210915_l10n-co-partner-person-type_fixes-depends.patch +++ b/patches/20210915_l10n-co-partner-person-type_fixes-depends.patch @@ -1,6 +1,7 @@ -diff -rupN l10n_co_partner_person_type.orig/__manifest__.py l10n_co_partner_person_type.patch/__manifest__.py ---- l10n_co_partner_person_type.orig/__manifest__.py 2021-09-08 10:06:18.888995295 -0500 -+++ l10n_co_partner_person_type.patch/__manifest__.py 2021-09-15 14:18:03.354806031 -0500 +diff --git a/l10n_co_partner_person_type/__manifest__.py b/l10n_co_partner_person_type/__manifest__.py +index 62717e2..5b00552 100644 +--- a/l10n_co_partner_person_type/__manifest__.py ++++ b/l10n_co_partner_person_type/__manifest__.py @@ -11,7 +11,10 @@ "website": "https://github.com/JoanMarin", "author": "Joan Marín Github@JoanMarin", diff --git a/patches/20211119_l10n-co-account-e-invoicing_off-by-one-error.patch b/patches/20211119_l10n-co-account-e-invoicing_fixes-off-by-one.patch similarity index 87% rename from patches/20211119_l10n-co-account-e-invoicing_off-by-one-error.patch rename to patches/20211119_l10n-co-account-e-invoicing_fixes-off-by-one.patch index b794fa9..73b4da6 100644 --- a/patches/20211119_l10n-co-account-e-invoicing_off-by-one-error.patch +++ b/patches/20211119_l10n-co-account-e-invoicing_fixes-off-by-one.patch @@ -7,7 +7,7 @@ index eadfde2..690b1e8 100644 days = (today - date_from).days - if int(dian_document.invoice_id.send_invoice_to_dian) <= days: -+ if (int(dian_document.invoice_id.send_invoice_to_dian) - 1) <= days: ++ if int(dian_document.invoice_id.send_invoice_to_dian) - 1 <= days: try: dian_document.action_process() except: