diff --git a/.copier-answers.yml b/.copier-answers.yml index fb43c10a2..934754a27 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,8 +1,7 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.14.2 +_commit: v1.17.2 _src_path: git+https://github.com/OCA/oca-addons-repo-template ci: GitHub -dependency_installation_mode: PIP generate_requirements_txt: true github_check_license: true github_ci_extra_env: {} @@ -11,6 +10,7 @@ github_enable_makepot: true github_enable_stale_action: true github_enforce_dev_status_compatibility: true include_wkhtmltopdf: false +odoo_test_flavor: Both odoo_version: 14.0 org_name: Odoo Community Association (OCA) org_slug: OCA @@ -19,6 +19,4 @@ repo_description: 'TODO: add repo description.' repo_name: reporting-engine repo_slug: reporting-engine repo_website: https://github.com/OCA/reporting-engine -travis_apt_packages: [] -travis_apt_sources: [] diff --git a/.eslintrc.yml b/.eslintrc.yml index 9429bc688..fed88d70d 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -22,6 +22,7 @@ globals: odoo: readonly openerp: readonly owl: readonly + luxon: readonly # Styling is handled by Prettier, so we only need to enable AST rules; # see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 755f8a225..602ecbca2 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,8 +13,10 @@ jobs: pre-commit: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-python@v2 + with: + python-version: "3.11" - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - uses: actions/cache@v1 @@ -25,6 +27,15 @@ jobs: run: pip install pre-commit - name: Run pre-commit run: pre-commit run --all-files --show-diff-on-failure --color=always + env: + # Consider valid a PR that changes README fragments but doesn't + # change the README.rst file itself. It's not really a problem + # because the bot will update it anyway after merge. This way, we + # lower the barrier for functional contributors that want to fix the + # readme fragments, while still letting developers get README + # auto-generated (which also helps functionals when using runboat). + # DOCS https://pre-commit.com/#temporarily-disabling-hooks + SKIP: oca-gen-addon-readme - name: Check that all files generated by pre-commit are in git run: | newfiles="$(git ls-files --others --exclude-from=.gitignore)" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 215b84b0f..326c12556 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest name: Detect unreleased dependencies steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: | for reqfile in requirements.txt test-requirements.txt ; do if [ -f ${reqfile} ] ; then @@ -36,10 +36,10 @@ jobs: matrix: include: - container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest - makepot: "true" name: test with Odoo - container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest name: test with OCB + makepot: "true" services: postgres: image: postgres:9.6 @@ -50,7 +50,7 @@ jobs: ports: - 5432:5432 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: persist-credentials: false - name: Install addons and dependencies diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6142fe18f..d7ae4c94d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,6 +12,8 @@ exclude: | /static/(src/)?lib/| # Repos using Sphinx to generate docs don't need prettying ^docs/_templates/.*\.html$| + # Don't bother non-technical authors with formatting issues in docs + readme/.*\.(rst|md)$| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: @@ -33,12 +35,24 @@ repos: language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools - rev: ab1d7f6 + rev: 969238e47c07d0c40573acff81d170f63245d738 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons - id: oca-fix-manifest-website args: ["https://github.com/OCA/reporting-engine"] + - id: oca-gen-addon-readme + args: + - --addons-dir=. + - --branch=14.0 + - --org-name=OCA + - --repo-name=reporting-engine + - --if-source-changed + - repo: https://github.com/OCA/odoo-pre-commit-hooks + rev: v0.0.25 + hooks: + - id: oca-checks-odoo-module + - id: oca-checks-po - repo: https://github.com/myint/autoflake rev: v1.4 hooks: diff --git a/base_comment_template/i18n/base_comment_template.pot b/base_comment_template/i18n/base_comment_template.pot index 61b780921..0154b793a 100644 --- a/base_comment_template/i18n/base_comment_template.pot +++ b/base_comment_template/i18n/base_comment_template.pot @@ -93,7 +93,6 @@ msgstr "" #: model:ir.ui.menu,name:base_comment_template.reports_base_comment_template_menuitem #: model_terms:ir.ui.view,arch_db:base_comment_template.view_base_comment_template_form #: model_terms:ir.ui.view,arch_db:base_comment_template.view_base_comment_template_search -#: model_terms:ir.ui.view,arch_db:base_comment_template.view_base_comment_template_tree #: model_terms:ir.ui.view,arch_db:base_comment_template.view_partner_form msgid "Comment Templates" msgstr "" diff --git a/base_comment_template/views/base_comment_template_view.xml b/base_comment_template/views/base_comment_template_view.xml index 1dc6d1f6e..28e175048 100644 --- a/base_comment_template/views/base_comment_template_view.xml +++ b/base_comment_template/views/base_comment_template_view.xml @@ -4,7 +4,7 @@ base.comment.template.search base.comment.template - + diff --git a/base_comment_template/wizard/base_comment_template_preview_views.xml b/base_comment_template/wizard/base_comment_template_preview_views.xml index 513bab63d..3d9c02df6 100644 --- a/base_comment_template/wizard/base_comment_template_preview_views.xml +++ b/base_comment_template/wizard/base_comment_template_preview_views.xml @@ -1,6 +1,5 @@ - base.comment.template.preview.form @@ -9,33 +8,33 @@

Preview of + name="base_comment_template_id" + readonly="1" + nolabel="1" + class="oe_inline" + />

Choose an example + name="model_id" + domain="[('id', 'in', model_ids or False)]" + /> record:
+ name="resource_ref" + class="oe_inline" + options="{'hide_model': True, 'no_create': True, 'no_edit': True, 'no_open': True}" + attrs="{'invisible': [('no_record', '=', True)]}" + /> No records + class="text-warning" + attrs="{'invisible': [('no_record', '=', False)]}" + >No records
@@ -48,18 +47,18 @@
-
diff --git a/bi_sql_editor/models/bi_sql_view.py b/bi_sql_editor/models/bi_sql_view.py index b9b5d8420..1c58c2520 100644 --- a/bi_sql_editor/models/bi_sql_view.py +++ b/bi_sql_editor/models/bi_sql_view.py @@ -450,7 +450,7 @@ class BiSQLView(models.Model): "type": "tree", "model": self.model_id.model, "arch": """""" - """{}""" + """{}""" """""".format( "".join([x._prepare_tree_field() for x in self.bi_sql_view_field_ids]) ), diff --git a/report_async/data/mail_template.xml b/report_async/data/mail_template.xml index 01ea4b9d5..ac2f43e19 100644 --- a/report_async/data/mail_template.xml +++ b/report_async/data/mail_template.xml @@ -1,45 +1,44 @@ - - + Report Async: New Report Available Your report is available, ${object.name} ${object.company_id.partner_id.email_formatted|safe} + name="email_from" + >${object.company_id.partner_id.email_formatted|safe} ${user.partner_id.id} + border="0" + cellpadding="0" + cellspacing="0" + style="background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;" + >
+ border="0" + cellpadding="0" + cellspacing="0" + width="590" + style="padding: 16px; background-color: white; color: #454748; border-collapse:separate;" + >
+ border="0" + cellpadding="0" + cellspacing="0" + width="590" + style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;" + >
+ valign="top" + style="font-size: 13px;" + > % set base_url_async = object.env['ir.config_parameter'].sudo().get_param('web.base.url.async_reports') % set base_url = base_url_async or object.env['ir.config_parameter'].sudo().get_param('web.base.url') % set download_url = '%s/web/content/ir.attachment/%s/datas/%s?download=true' % (base_url, object.id, object.name, ) @@ -47,10 +46,10 @@ Dear ${object.create_uid.partner_id.name or ''},

Your requested report, ${object.name}, is available for + > download + href='${download_url}' + >download .

Have a nice day!
@@ -69,5 +68,4 @@ - diff --git a/report_async/i18n/report_async.pot b/report_async/i18n/report_async.pot index 223747275..3d7ef8000 100644 --- a/report_async/i18n/report_async.pot +++ b/report_async/i18n/report_async.pot @@ -385,7 +385,6 @@ msgstr "" #: model:ir.actions.act_window,name:report_async.action_report_async #: model:ir.ui.menu,name:report_async.menu_report_async #: model_terms:ir.ui.view,arch_db:report_async.view_report_async_search -#: model_terms:ir.ui.view,arch_db:report_async.view_report_async_tree msgid "Report Center" msgstr "" diff --git a/report_async/views/report_async.xml b/report_async/views/report_async.xml index 406856543..c3bc8f3cc 100644 --- a/report_async/views/report_async.xml +++ b/report_async/views/report_async.xml @@ -4,7 +4,7 @@ report.async.tree report.async - +