diff --git a/.copier-answers.yml b/.copier-answers.yml index de0edb3..c0d82c1 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v4.8 +_commit: v5.0 _src_path: git@github.com:Noviat-CI/addons-repo-template.git ci_disable_autoinstall_modules: account_asset odoo_test_flavor: Both diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 38b2266..ddf69aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,11 +80,7 @@ jobs: mkdir -p ${{ env.INSTALL_ADDONS_DIR }}/setup find $(realpath $ADDONS_DIR) $(realpath ${{ env.ADDITIONAL_ADDONS_DIR }}) -name __manifest__.py -exec sh -c 'ln -s "$(dirname "$0")" "${{ env.INSTALL_ADDONS_DIR }}"' {} \; find $(realpath $ADDONS_DIR) $(realpath ${{ env.ADDITIONAL_ADDONS_DIR }}) -iwholename '*/setup/*/setup.py' -exec sh -c 'ln -s "$(dirname "$0")" "${{ env.INSTALL_ADDONS_DIR }}/setup"' {} \; -<<<<<<< before updating - if [ -n ${{ matrix.exclude }} ] -======= if [ -n ${{ matrix.exclude}} ] ->>>>>>> after updating then remove_excluded_modules ${{ env.INSTALL_ADDONS_DIR }} ${{ matrix.exclude }} fi @@ -101,6 +97,9 @@ jobs: run: | echo "server_wide_modules = web,module_change_auto_install" >> ${ODOO_RC} echo "ODOO_MODULES_AUTO_INSTALL_DISABLED=${{ matrix.EXCLUDE_MODULES }}" >> $GITHUB_ENV + - name: Inject GitHub token for Noviat orgs in test-requirements.txt + run: | + sed -i -E "s#https://github.com/(Noviat-(Projects|Generic|ARP|Internal))#https://${{ secrets.PRIVATE_TOKEN }}@github.com/\1#g" test-requirements.txt - name: Install addons and dependencies run: | (ADDONS_PATH=${ADDONS_PATH} ADDONS_DIR=${INSTALL_ADDONS_DIR} oca_install_addons) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1cc78e2..bff66f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: hooks: - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: bf9ecb9938b6a5deca0ff3d870fbd3f33341fded + rev: b89f767503be6ab2b11e4f50a7557cb20066e667 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -110,7 +110,7 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.3 + rev: v0.6.8 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/account_ebics/i18n/account_ebics.pot b/account_ebics/i18n/account_ebics.pot index 1d1f026..7320e12 100644 --- a/account_ebics/i18n/account_ebics.pot +++ b/account_ebics/i18n/account_ebics.pot @@ -468,6 +468,7 @@ msgstr "" #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__ebics_file_format_ids #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__format_id #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_format_view_form +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_format_view_search msgid "EBICS File Format" msgstr "" @@ -772,6 +773,16 @@ msgstr "" msgid "EBICS protocol version" msgstr "" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_format_view_search +msgid "EBICS version 2" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_format_view_search +msgid "EBICS version 3" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_userid.py:0 diff --git a/account_ebics/migrations/13.0.1.1/post-migration.py b/account_ebics/migrations/13.0.1.1/post-migration.py index ad8f969..954d6c5 100644 --- a/account_ebics/migrations/13.0.1.1/post-migration.py +++ b/account_ebics/migrations/13.0.1.1/post-migration.py @@ -64,16 +64,15 @@ def _ebics_config_upgrade(env, version): user_vals[fld] = cfg_data[fld] ebics_userid = env["ebics.userid"].create(user_vals) env.cr.execute( - """ + f""" UPDATE ir_attachment - SET res_model = 'ebics.userid', res_id = %s + SET res_model = 'ebics.userid', res_id = {ebics_userid.id} WHERE name in ('ebics_ini_letter', 'ebics_public_bank_keys'); """ - % ebics_userid.id ) if len(cfg_datas) == 1: - env.cr.execute("UPDATE ebics_file SET ebics_userid_id = %s" % ebics_userid.id) + env.cr.execute(f"UPDATE ebics_file SET ebics_userid_id = {ebics_userid.id}") def _noupdate_changes(env, version): diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 5f2d893..75ac158 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -305,7 +305,7 @@ class EbicsFile(models.Model): self.company_ids = [(6, 0, company_ids)] ctx = dict(self.env.context, statement_ids=statements.ids) module = __name__.split("addons.")[1].split(".")[0] - result_view = self.env.ref("%s.ebics_file_view_form_result" % module) + result_view = self.env.ref(f"{module}.ebics_file_view_form_result") return { "name": self.env._("Import EBICS File"), "res_id": self.id, diff --git a/account_ebics/models/ebics_userid.py b/account_ebics/models/ebics_userid.py index 0ae8a42..a37e91c 100644 --- a/account_ebics/models/ebics_userid.py +++ b/account_ebics/models/ebics_userid.py @@ -584,7 +584,7 @@ class EbicsUserID(models.Model): self.ensure_one() ctx = dict(self.env.context, default_ebics_userid_id=self.id) module = __name__.split("addons.")[1].split(".")[0] - view = self.env.ref("%s.ebics_change_passphrase_view_form" % module) + view = self.env.ref(f"{module}.ebics_change_passphrase_view_form") return { "name": self.env._("EBICS keys change passphrase"), "view_mode": "form", diff --git a/account_ebics/models/fintech_ebics_register.py b/account_ebics/models/fintech_ebics_register.py index 5492039..7225620 100644 --- a/account_ebics/models/fintech_ebics_register.py +++ b/account_ebics/models/fintech_ebics_register.py @@ -41,6 +41,6 @@ except RuntimeError as e: except Exception: msg = "fintech.register error" tb = "".join(format_exception(*exc_info())) - msg += "\n%s" % tb + msg += f"\n{tb}" _logger.error(msg) fintech.register() diff --git a/account_ebics/wizards/ebics_admin_order.py b/account_ebics/wizards/ebics_admin_order.py index 6e284af..5f32687 100644 --- a/account_ebics/wizards/ebics_admin_order.py +++ b/account_ebics/wizards/ebics_admin_order.py @@ -38,7 +38,7 @@ class EbicsAdminOrder(models.TransientModel): pp = pprint.PrettyPrinter() self.note = pp.pformat(data) module = __name__.split("addons.")[1].split(".")[0] - result_view = self.env.ref("%s.ebics_admin_order_view_form_result" % module) + result_view = self.env.ref(f"{module}.ebics_admin_order_view_form_result") return { "name": self.env._("EBICS Administrative Order result"), "res_id": self.id, diff --git a/account_ebics/wizards/ebics_change_passphrase.py b/account_ebics/wizards/ebics_change_passphrase.py index 6482e99..628aaa5 100644 --- a/account_ebics/wizards/ebics_change_passphrase.py +++ b/account_ebics/wizards/ebics_change_passphrase.py @@ -103,9 +103,7 @@ class EbicsChangePassphrase(models.TransientModel): self.note += "The EBICS Signature Passphrase has been changed." module = __name__.split("addons.")[1].split(".")[0] - result_view = self.env.ref( - "%s.ebics_change_passphrase_view_form_result" % module - ) + result_view = self.env.ref(f"{module}.ebics_change_passphrase_view_form_result") return { "name": self.env._("EBICS Keys Change Passphrase"), "res_id": self.id, diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index 66891e6..1c0ad01 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -201,7 +201,7 @@ class EbicsXfer(models.TransientModel): if ebics_file: ctx["ebics_file_id"] = ebics_file.id module = __name__.split("addons.")[1].split(".")[0] - result_view = self.env.ref("%s.ebics_xfer_view_form_result" % module) + result_view = self.env.ref(f"{module}.ebics_xfer_view_form_result") return { "name": self.env._("EBICS file transfer result"), "res_id": self.id, @@ -320,7 +320,7 @@ class EbicsXfer(models.TransientModel): order_type=df.order_type, ) tb = "".join(format_exception(*exc_info())) - self.note += "\n%s" % tb + self.note += f"\n{tb}" else: # mark received data so that it is not included in further # downloads @@ -342,7 +342,7 @@ class EbicsXfer(models.TransientModel): ctx["err_cnt"] = err_cnt module = __name__.split("addons.")[1].split(".")[0] - result_view = self.env.ref("%s.ebics_xfer_view_form_result" % module) + result_view = self.env.ref(f"{module}.ebics_xfer_view_form_result") return { "name": self.env._("EBICS file transfer result"), "res_id": self.id, @@ -452,7 +452,7 @@ class EbicsXfer(models.TransientModel): self.note += "\n" self.note += self.env._("Unknown Error") tb = "".join(format_exception(*exc_info())) - self.note += "\n%s" % tb + self.note += f"\n{tb}" if self.ebics_config_id.ebics_version == "H003": OrderID = self.ebics_config_id._get_order_number() @@ -530,7 +530,7 @@ class EbicsXfer(models.TransientModel): self.note += "\n" self.note += self.env._("Unknown Error") tb = "".join(format_exception(*exc_info())) - self.note += "\n%s" % tb + self.note += f"\n{tb}" client = False return client diff --git a/account_ebics_oca_statement_import/i18n/account_ebics_oca_statement_import.pot b/account_ebics_oca_statement_import/i18n/account_ebics_oca_statement_import.pot index 67f7b94..cc8cccd 100644 --- a/account_ebics_oca_statement_import/i18n/account_ebics_oca_statement_import.pot +++ b/account_ebics_oca_statement_import/i18n/account_ebics_oca_statement_import.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 17.0+e\n" +"Project-Id-Version: Odoo Server 18.0+e\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -16,7 +16,6 @@ msgstr "" #. module: account_ebics_oca_statement_import #. odoo-python #: code:addons/account_ebics_oca_statement_import/wizards/account_statement_import.py:0 -#, python-format msgid "Error detected while processing and EBICS File" msgstr "" @@ -28,21 +27,17 @@ msgstr "" #. module: account_ebics_oca_statement_import #. odoo-python #: code:addons/account_ebics_oca_statement_import/wizards/account_statement_import.py:0 -#, python-format msgid "Statement %(st_name)s dated %(date)s has already been imported." msgstr "" #. module: account_ebics_oca_statement_import #. odoo-python #: code:addons/account_ebics_oca_statement_import/wizards/account_statement_import.py:0 -#, python-format msgid "This file doesn't contain any statement." msgstr "" #. module: account_ebics_oca_statement_import #. odoo-python #: code:addons/account_ebics_oca_statement_import/wizards/account_statement_import.py:0 -#: code:addons/account_ebics_oca_statement_import/wizards/account_statement_import.py:0 -#, python-format msgid "This file doesn't contain any transaction." msgstr ""