From f28195665c6d4215d9a49d9952421dc5ab4542c4 Mon Sep 17 00:00:00 2001 From: oca-git-bot Date: Fri, 27 Oct 2023 21:45:55 +0200 Subject: [PATCH 1/9] [IMP] update dotfiles --- .copier-answers.yml | 6 ++---- .eslintrc.yml | 1 + .github/workflows/pre-commit.yml | 13 ++++++++++++- .github/workflows/test.yml | 6 +++--- .pre-commit-config.yaml | 16 +++++++++++++++- 5 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 08ed86c5835..d2c34cfc4db 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: gh: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: Set of general modules related to HR management repo_name: HR modules repo_slug: hr repo_website: https://github.com/OCA/hr -travis_apt_packages: [] -travis_apt_sources: [] diff --git a/.eslintrc.yml b/.eslintrc.yml index 9429bc688aa..fed88d70d23 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 755f8a22517..602ecbca24d 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 215b84b0f85..326c1255676 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 422b268ea4c..4a4ab46a374 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/hr"] + - id: oca-gen-addon-readme + args: + - --addons-dir=. + - --branch=14.0 + - --org-name=OCA + - --repo-name=hr + - --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: From 0b88ee369af56d5d36ae57c7edd9b10cfd5fa0e1 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 27 Oct 2023 20:14:54 +0000 Subject: [PATCH 2/9] [UPD] Update hr_course.pot --- hr_course/i18n/hr_course.pot | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hr_course/i18n/hr_course.pot b/hr_course/i18n/hr_course.pot index 50a9e5d15fb..b684a24477e 100644 --- a/hr_course/i18n/hr_course.pot +++ b/hr_course/i18n/hr_course.pot @@ -407,9 +407,7 @@ msgstr "" #. module: hr_course #: model:ir.model.fields,help:hr_course.field_hr_course__message_has_error -#: model:ir.model.fields,help:hr_course.field_hr_course__message_has_sms_error #: model:ir.model.fields,help:hr_course.field_hr_course_schedule__message_has_error -#: model:ir.model.fields,help:hr_course.field_hr_course_schedule__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" @@ -608,12 +606,6 @@ msgstr "" msgid "Result" msgstr "" -#. module: hr_course -#: model:ir.model.fields,field_description:hr_course.field_hr_course__message_has_sms_error -#: model:ir.model.fields,field_description:hr_course.field_hr_course_schedule__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: hr_course #: model_terms:ir.ui.view,arch_db:hr_course.hr_course_form_view msgid "Schedules" From 0964a382aa4200523bcab647dc9ee79c75606389 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 27 Oct 2023 20:15:00 +0000 Subject: [PATCH 3/9] [UPD] Update hr_employee_medical_examination.pot --- .../i18n/hr_employee_medical_examination.pot | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hr_employee_medical_examination/i18n/hr_employee_medical_examination.pot b/hr_employee_medical_examination/i18n/hr_employee_medical_examination.pot index f7bbc5fcfbb..bb5be4337fb 100644 --- a/hr_employee_medical_examination/i18n/hr_employee_medical_examination.pot +++ b/hr_employee_medical_examination/i18n/hr_employee_medical_examination.pot @@ -219,7 +219,6 @@ msgstr "" #. module: hr_employee_medical_examination #: model:ir.model.fields,help:hr_employee_medical_examination.field_hr_employee_medical_examination__message_has_error -#: model:ir.model.fields,help:hr_employee_medical_examination.field_hr_employee_medical_examination__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" @@ -387,11 +386,6 @@ msgstr "" msgid "Result" msgstr "" -#. module: hr_employee_medical_examination -#: model:ir.model.fields,field_description:hr_employee_medical_examination.field_hr_employee_medical_examination__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: hr_employee_medical_examination #: model:ir.model.fields,field_description:hr_employee_medical_examination.field_hr_employee_medical_examination__state msgid "State" From a48a6d0db9b2129a4392e1123677c6d02c110501 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 27 Oct 2023 20:15:06 +0000 Subject: [PATCH 4/9] [UPD] Update hr_personal_equipment_request.pot --- .../i18n/hr_personal_equipment_request.pot | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot b/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot index 5aa9bb6ca21..cd1e1e95b2e 100644 --- a/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot +++ b/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot @@ -246,9 +246,7 @@ msgstr "" #. module: hr_personal_equipment_request #: model:ir.model.fields,help:hr_personal_equipment_request.field_hr_personal_equipment__message_has_error -#: model:ir.model.fields,help:hr_personal_equipment_request.field_hr_personal_equipment__message_has_sms_error #: model:ir.model.fields,help:hr_personal_equipment_request.field_hr_personal_equipment_request__message_has_error -#: model:ir.model.fields,help:hr_personal_equipment_request.field_hr_personal_equipment_request__message_has_sms_error msgid "If checked, some messages have a delivery error." msgstr "" @@ -437,12 +435,6 @@ msgstr "" msgid "Responsible User" msgstr "" -#. module: hr_personal_equipment_request -#: model:ir.model.fields,field_description:hr_personal_equipment_request.field_hr_personal_equipment__message_has_sms_error -#: model:ir.model.fields,field_description:hr_personal_equipment_request.field_hr_personal_equipment_request__message_has_sms_error -msgid "SMS Delivery error" -msgstr "" - #. module: hr_personal_equipment_request #: model:ir.model.fields,field_description:hr_personal_equipment_request.field_hr_personal_equipment__start_date msgid "Start Date" From f4a15bb2f8b04ad896a8b1ce9f64e0efd06f5857 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 27 Oct 2023 20:15:06 +0000 Subject: [PATCH 5/9] [UPD] Update hr_personal_equipment_request_tier_validation.pot --- .../i18n/hr_personal_equipment_request_tier_validation.pot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hr_personal_equipment_request_tier_validation/i18n/hr_personal_equipment_request_tier_validation.pot b/hr_personal_equipment_request_tier_validation/i18n/hr_personal_equipment_request_tier_validation.pot index 2d910b113d6..cf46f70ce4b 100644 --- a/hr_personal_equipment_request_tier_validation/i18n/hr_personal_equipment_request_tier_validation.pot +++ b/hr_personal_equipment_request_tier_validation/i18n/hr_personal_equipment_request_tier_validation.pot @@ -96,6 +96,11 @@ msgstr "" msgid "Validated Message" msgstr "" +#. module: hr_personal_equipment_request_tier_validation +#: model:ir.model.fields,field_description:hr_personal_equipment_request_tier_validation.field_hr_personal_equipment_request__validation_status +msgid "Validation Status" +msgstr "" + #. module: hr_personal_equipment_request_tier_validation #: model:ir.model.fields,field_description:hr_personal_equipment_request_tier_validation.field_hr_personal_equipment_request__review_ids msgid "Validations" From 7fdfa11afac78de65f38b2e23a17aacf5d76dc05 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 30 Oct 2023 10:28:17 +0100 Subject: [PATCH 6/9] *: fix pylint --- hr_course/views/hr_course_category_views.xml | 2 +- hr_employee_id/i18n/fr.po | 2 +- hr_employee_id/i18n/hr.po | 2 +- hr_employee_id/i18n/hr_HR.po | 2 +- hr_employee_id/i18n/nl_NL.po | 2 +- hr_employee_id/i18n/sl.po | 2 +- .../hr_employee_medical_examination_security.xml | 16 +++++++--------- .../data/data_relative_relation.xml | 4 +--- .../views/hr_employee_relative.xml | 2 +- .../static/src/js/hr_org_chart_overview.js | 2 +- hr_org_chart_overview/views/hr_views.xml | 12 +++++------- .../views/hr_personal_equipment.xml | 1 - .../data/message_subtypes.xml | 4 +--- 13 files changed, 22 insertions(+), 31 deletions(-) diff --git a/hr_course/views/hr_course_category_views.xml b/hr_course/views/hr_course_category_views.xml index e10851d0f19..be2b913c642 100644 --- a/hr_course/views/hr_course_category_views.xml +++ b/hr_course/views/hr_course_category_views.xml @@ -25,7 +25,7 @@ hr.course.category - + diff --git a/hr_employee_id/i18n/fr.po b/hr_employee_id/i18n/fr.po index 5c3d74d7912..4673e022659 100644 --- a/hr_employee_id/i18n/fr.po +++ b/hr_employee_id/i18n/fr.po @@ -133,7 +133,7 @@ msgstr "Le numéro d'employé doit être unique par société(s)." #: code:addons/hr_employee_id/models/hr_employee.py:0 #, fuzzy, python-format msgid "Unable to generate unique Employee ID in %d steps." -msgstr "Impossible de générer le numéro d'ID employé qui doit être unique." +msgstr "" #~ msgid "" #~ "(*) This configuration is related to the company you're logged into." diff --git a/hr_employee_id/i18n/hr.po b/hr_employee_id/i18n/hr.po index c7d1401de8f..19fee5bdd69 100644 --- a/hr_employee_id/i18n/hr.po +++ b/hr_employee_id/i18n/hr.po @@ -128,7 +128,7 @@ msgstr "Šifra djelatnika mora biti jedinstvena unutar(između) poduzeća" #: code:addons/hr_employee_id/models/hr_employee.py:0 #, fuzzy, python-format msgid "Unable to generate unique Employee ID in %d steps." -msgstr "Nije moguće generirati jedinstvenu šifru djelatnika." +msgstr "" #~ msgid "" #~ "(*) This configuration is related to the company you're logged into." diff --git a/hr_employee_id/i18n/hr_HR.po b/hr_employee_id/i18n/hr_HR.po index 370084c5258..7c5187bea01 100644 --- a/hr_employee_id/i18n/hr_HR.po +++ b/hr_employee_id/i18n/hr_HR.po @@ -132,7 +132,7 @@ msgstr "ID broj djelatnika mora biti jedinstven za poduzeće(a)." #: code:addons/hr_employee_id/models/hr_employee.py:0 #, fuzzy, python-format msgid "Unable to generate unique Employee ID in %d steps." -msgstr "Nije moguće generiranje jedinstvenog ID djelatnika." +msgstr "" #~ msgid "" #~ "(*) This configuration is related to the company you're logged into." diff --git a/hr_employee_id/i18n/nl_NL.po b/hr_employee_id/i18n/nl_NL.po index 625e6bf48e3..1fdc40e9a5e 100644 --- a/hr_employee_id/i18n/nl_NL.po +++ b/hr_employee_id/i18n/nl_NL.po @@ -133,7 +133,7 @@ msgstr "Het Personeelsnummer moet uniek zijn binnen elk bedrijf en bedrijven." #: code:addons/hr_employee_id/models/hr_employee.py:0 #, fuzzy, python-format msgid "Unable to generate unique Employee ID in %d steps." -msgstr "Niet in staat om een uniek personeelsnummer te genereren." +msgstr "" #~ msgid "" #~ "(*) This configuration is related to the company you're logged into." diff --git a/hr_employee_id/i18n/sl.po b/hr_employee_id/i18n/sl.po index 61c49a90850..7c8364d8e37 100644 --- a/hr_employee_id/i18n/sl.po +++ b/hr_employee_id/i18n/sl.po @@ -131,7 +131,7 @@ msgstr "Številka kadra mora biti unikatna v sklopu družbe (družb)." #: code:addons/hr_employee_id/models/hr_employee.py:0 #, fuzzy, python-format msgid "Unable to generate unique Employee ID in %d steps." -msgstr "Ni možno ustvariti ID številke kadra, ki bi bila unikatna." +msgstr "" #~ msgid "Created by" #~ msgstr "Ustvaril" diff --git a/hr_employee_medical_examination/security/hr_employee_medical_examination_security.xml b/hr_employee_medical_examination/security/hr_employee_medical_examination_security.xml index dbcffc8efcd..8795f82d2c8 100644 --- a/hr_employee_medical_examination/security/hr_employee_medical_examination_security.xml +++ b/hr_employee_medical_examination/security/hr_employee_medical_examination_security.xml @@ -1,23 +1,21 @@ - - + Base User: Only own examinations + name="model_id" + ref="hr_employee_medical_examination.model_hr_employee_medical_examination" + /> [('employee_id.user_id','=',user.id)] Manager: All Examinations + name="model_id" + ref="hr_employee_medical_examination.model_hr_employee_medical_examination" + /> [(1,'=',1)] - diff --git a/hr_employee_relative/data/data_relative_relation.xml b/hr_employee_relative/data/data_relative_relation.xml index c1f805fb727..ef84f60357c 100644 --- a/hr_employee_relative/data/data_relative_relation.xml +++ b/hr_employee_relative/data/data_relative_relation.xml @@ -1,6 +1,5 @@ - - + - - + New Applicant @@ -11,5 +10,4 @@ job_id - From aaf5d554481d03c2e41a8185e18cef13ec9be3be Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 30 Oct 2023 09:33:48 +0000 Subject: [PATCH 7/9] [UPD] Update hr_course.pot --- hr_course/i18n/hr_course.pot | 1 - 1 file changed, 1 deletion(-) diff --git a/hr_course/i18n/hr_course.pot b/hr_course/i18n/hr_course.pot index b684a24477e..831e32ec124 100644 --- a/hr_course/i18n/hr_course.pot +++ b/hr_course/i18n/hr_course.pot @@ -186,7 +186,6 @@ msgstr "" #: model:ir.actions.act_window,name:hr_course.open_view_course_category_form #: model:ir.ui.menu,name:hr_course.menu_view_course_category_form #: model_terms:ir.ui.view,arch_db:hr_course.view_course_category_form -#: model_terms:ir.ui.view,arch_db:hr_course.view_course_category_list #: model_terms:ir.ui.view,arch_db:hr_course.view_course_category_search msgid "Course Categories" msgstr "" From 611950d2034a70d7729479c10a767bee11e037eb Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 30 Oct 2023 09:33:54 +0000 Subject: [PATCH 8/9] [UPD] Update hr_employee_relative.pot --- hr_employee_relative/i18n/hr_employee_relative.pot | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hr_employee_relative/i18n/hr_employee_relative.pot b/hr_employee_relative/i18n/hr_employee_relative.pot index 72a2be11e24..e99c347242e 100644 --- a/hr_employee_relative/i18n/hr_employee_relative.pot +++ b/hr_employee_relative/i18n/hr_employee_relative.pot @@ -58,11 +58,6 @@ msgstr "" msgid "Employee" msgstr "" -#. module: hr_employee_relative -#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree -msgid "Employee Relatives" -msgstr "" - #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" From bdfb0b3998c9c40974c2f9041ae0d16f0815bcbc Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 30 Oct 2023 09:33:57 +0000 Subject: [PATCH 9/9] [UPD] Update hr_personal_equipment_request.pot --- .../i18n/hr_personal_equipment_request.pot | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot b/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot index cd1e1e95b2e..f54d592f169 100644 --- a/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot +++ b/hr_personal_equipment_request/i18n/hr_personal_equipment_request.pot @@ -153,11 +153,6 @@ msgstr "" msgid "Employee Personal Equipment" msgstr "" -#. module: hr_personal_equipment_request -#: model_terms:ir.ui.view,arch_db:hr_personal_equipment_request.hr_personal_equipment_tree_view -msgid "Employee Personal Equipments" -msgstr "" - #. module: hr_personal_equipment_request #: code:addons/hr_personal_equipment_request/models/hr_employee.py:0 #: model:ir.model.fields,field_description:hr_personal_equipment_request.field_hr_employee__equipment_request_ids