From 337bb5c90fd97330eec1c174eb2300e087752fe2 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Tue, 14 Apr 2026 13:17:39 +0200 Subject: [PATCH 1/3] [IMP] cb_hr_views: make it editable and not so strict --- cb_hr_views/models/hr_employee.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cb_hr_views/models/hr_employee.py b/cb_hr_views/models/hr_employee.py index 5de923bc..6ec36406 100644 --- a/cb_hr_views/models/hr_employee.py +++ b/cb_hr_views/models/hr_employee.py @@ -46,7 +46,6 @@ def _default_personal_identifier(self): work_email = fields.Char(related="partner_id.email", store=True) parent_id = fields.Many2one( compute="_compute_department_parent_id", - readonly=True, groups="hr.group_hr_user", store=True, ) @@ -149,7 +148,7 @@ def _onchange_force_service_computation(self): if self.force_service_computation and not self.force_service_start_date: self.force_service_start_date = self.first_contract_id.date_start - @api.depends("department_id", "department_id.manager_id") + @api.depends("department_id") def _compute_department_parent_id(self): for record in self: parent = False From d23452e10494bcdd514e7524b18e79280bcb49df Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Tue, 5 May 2026 05:26:14 +0200 Subject: [PATCH 2/3] Update from template --- .copier-answers.yml | 3 +- .gitattributes | 1 + .github/workflows/pre-commit.yml | 2 + .github/workflows/test.yml | 9 ++- .pre-commit-config.yaml | 9 ++- .pylintrc | 69 ++++++++++--------- .pylintrc-mandatory | 50 +++++++------- README.md | 4 +- cb_hr_views/README.rst | 6 +- cb_hr_views/static/description/index.html | 24 ++++--- hr_holidays_extendable/README.rst | 6 +- .../static/description/index.html | 26 ++++--- 12 files changed, 122 insertions(+), 87 deletions(-) create mode 100644 .gitattributes diff --git a/.copier-answers.yml b/.copier-answers.yml index a47680f8..e98db113 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,7 +1,6 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.32 +_commit: v1.40 _src_path: https://github.com/OCA/oca-addons-repo-template.git -ci: GitHub convert_readme_fragments_to_markdown: false enable_checklog_odoo: false generate_requirements_txt: true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..e0d56685 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +test-requirements.txt merge=union diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index afd7524e..43b82fe8 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,6 +17,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" + cache: 'pip' + cache-dependency-path: '.pre-commit-config.yaml' - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - uses: actions/cache@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0642af03..ed8134df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: makepot: "false" services: postgres: - image: postgres:12.0 + image: postgres:12 env: POSTGRES_USER: odoo POSTGRES_PASSWORD: odoo @@ -46,6 +46,13 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests + - name: Upload screenshots from JS tests + uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: Screenshots of failed JS tests - ${{ matrix.name }}${{ join(matrix.include) }} + path: /tmp/odoo_tests/${{ env.PGDATABASE }} + if-no-files-found: ignore - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1ee1d55..e8381304 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,12 +38,17 @@ repos: entry: found a en.po file language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' + - id: obsolete dotfiles + name: obsolete dotfiles + entry: found obsolete files; remove them + files: '^(\.travis\.yml|\.t2d\.yml|CONTRIBUTING\.md)$' + language: fail - repo: https://github.com/sbidoul/whool - rev: v1.2 + rev: v1.3 hooks: - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: d5fab7ee87fceee858a3d01048c78a548974d935 + rev: f9b919b9868143135a9c9cb03021089cabba8223 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons diff --git a/.pylintrc b/.pylintrc index ac107acd..d8c1b7d2 100644 --- a/.pylintrc +++ b/.pylintrc @@ -25,19 +25,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -48,73 +54,68 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout, - # messages that do not cause the lint step to fail - consider-merging-classes-inherited, + missing-manifest-dependency, + too-complex,, create-user-wo-reset-password, dangerous-filter-wo-user, - deprecated-module, file-not-used, - invalid-commit, - missing-manifest-dependency, missing-newline-extrafiles, - missing-readme, no-utf8-coding-comment, - odoo-addons-relative-import, old-api7-method-defined, + unnecessary-utf8-coding-comment, + # messages that do not cause the lint step to fail + consider-merging-classes-inherited, + deprecated-module, + invalid-commit, + missing-readme, + odoo-addons-relative-import, redefined-builtin, - too-complex, - unnecessary-utf8-coding-comment + manifest-external-assets [REPORTS] diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index ae1ac545..508bb2c6 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -17,19 +17,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -40,56 +46,50 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout [REPORTS] diff --git a/README.md b/README.md index 2442baca..4ef82914 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ + +# HR for CreuBlanca [![Pre-commit Status](https://github.com/tegin/cb-hr/actions/workflows/pre-commit.yml/badge.svg?branch=16.0)](https://github.com/tegin/cb-hr/actions/workflows/pre-commit.yml?query=branch%3A16.0) [![Build Status](https://github.com/tegin/cb-hr/actions/workflows/test.yml/badge.svg?branch=16.0)](https://github.com/tegin/cb-hr/actions/workflows/test.yml?query=branch%3A16.0) @@ -7,8 +9,6 @@ -# HR for CreuBlanca - CreuBlanca human resources diff --git a/cb_hr_views/README.rst b/cb_hr_views/README.rst index 66e5f74e..fa89e0c9 100644 --- a/cb_hr_views/README.rst +++ b/cb_hr_views/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =========== Cb Hr Views =========== @@ -13,7 +17,7 @@ Cb Hr Views .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-tegin%2Fcb--hr-lightgray.png?logo=github diff --git a/cb_hr_views/static/description/index.html b/cb_hr_views/static/description/index.html index 3f138b10..44e1f939 100644 --- a/cb_hr_views/static/description/index.html +++ b/cb_hr_views/static/description/index.html @@ -3,7 +3,7 @@ -Cb Hr Views +README.rst -
-

Cb Hr Views

+
+ + +Odoo Community Association + +
+

Cb Hr Views

-

Beta License: AGPL-3 tegin/cb-hr

+

Beta License: AGPL-3 tegin/cb-hr

Views for HR modules in Creu Blanca

Table of contents

@@ -384,7 +389,7 @@

Cb Hr Views

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -392,25 +397,26 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • CreuBlanca
-

Contributors

+

Contributors

  • Creu Blanca
-

Maintainers

+

Maintainers

This module is part of the tegin/cb-hr project on GitHub.

You are welcome to contribute.

+
diff --git a/hr_holidays_extendable/README.rst b/hr_holidays_extendable/README.rst index 077c9eae..7e775f0b 100644 --- a/hr_holidays_extendable/README.rst +++ b/hr_holidays_extendable/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ====================== Hr Holidays Extendable ====================== @@ -13,7 +17,7 @@ Hr Holidays Extendable .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-tegin%2Fcb--hr-lightgray.png?logo=github diff --git a/hr_holidays_extendable/static/description/index.html b/hr_holidays_extendable/static/description/index.html index 03c36c29..7c35be44 100644 --- a/hr_holidays_extendable/static/description/index.html +++ b/hr_holidays_extendable/static/description/index.html @@ -3,7 +3,7 @@ -Hr Holidays Extendable +README.rst -
-

Hr Holidays Extendable

+
+ + +Odoo Community Association + +
+

Hr Holidays Extendable

-

Beta License: AGPL-3 tegin/cb-hr

+

Beta License: AGPL-3 tegin/cb-hr

Allows a certain type of holidays to be extended.

A much easier solution would be to just create a new leave, but this module can be interesting if you want to keep the chatter and everything in one record. @@ -389,7 +394,7 @@

Hr Holidays Extendable

-

Usage

+

Usage

The first thing to do is select which holiday types can be extended. To do so go the configuration menu in the Leaves app, and select the check box Extendable.

@@ -401,7 +406,7 @@

Usage

updated with the new values.

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -409,25 +414,26 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • CreuBlanca
-

Maintainers

+

Maintainers

This module is part of the tegin/cb-hr project on GitHub.

You are welcome to contribute.

+
From 25e9741d3042a359cd1d679ac5c58592a93dbf52 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Tue, 5 May 2026 05:31:04 +0200 Subject: [PATCH 3/3] [FIX] tests --- test-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test-requirements.txt b/test-requirements.txt index 83c114d1..6dac10e8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -20,3 +20,4 @@ odoo-addon-medical_terminology_atc@git+https://github.com/tegin/medical-fhir.git odoo-addon-medical_terminology_sct@git+https://github.com/tegin/medical-fhir.git@16.0#subdirectory=medical_terminology_sct odoo-addon-medical_workflow@git+https://github.com/tegin/medical-fhir.git@16.0#subdirectory=medical_workflow odoo-addon-medical_administration_practitioner_specialty@git+https://github.com/tegin/medical-fhir.git@16.0#subdirectory=medical_administration_practitioner_specialty +odoo-addon-user_digital_signature@git+https://github.com/tegin/medical-fhir.git@16.0#subdirectory=user_digital_signature