diff --git a/.badges/code_style-black-000000.svg b/.badges/code_style-black-000000.svg new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmJhZGdlcy9jb2RlX3N0eWxlLWJsYWNrLTAwMDAwMC5zdmc= --- /dev/null +++ b/.badges/code_style-black-000000.svg @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<svg xmlns="http://www.w3.org/2000/svg" width="114" height="20"> + <linearGradient id="b" x2="0" y2="100%"> + <stop offset="0" stop-color="#bbb" stop-opacity=".1" /> + <stop offset="1" stop-opacity=".1" /> + </linearGradient> + <mask id="anybadge_1"> + <rect width="114" height="20" rx="3" fill="#fff" /> + </mask> + <g mask="url(#anybadge_1)"> + <path fill="#555" d="M0 0h72v20H0z" /> + <path fill="#000000" d="M72 0h42v20H72z" /> + <path fill="url(#b)" d="M0 0h114v20H0z" /> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="37.0" y="15" fill="#010101" fill-opacity=".3">code style</text> + <text x="36.0" y="14">code style</text> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="94.0" y="15" fill="#010101" fill-opacity=".3">black</text> + <text x="93.0" y="14">black</text> + </g> +</svg> diff --git a/.badges/code_style-prettier-ff69b4.svg b/.badges/code_style-prettier-ff69b4.svg new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmJhZGdlcy9jb2RlX3N0eWxlLXByZXR0aWVyLWZmNjliNC5zdmc= --- /dev/null +++ b/.badges/code_style-prettier-ff69b4.svg @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<svg xmlns="http://www.w3.org/2000/svg" width="129" height="20"> + <linearGradient id="b" x2="0" y2="100%"> + <stop offset="0" stop-color="#bbb" stop-opacity=".1" /> + <stop offset="1" stop-opacity=".1" /> + </linearGradient> + <mask id="anybadge_1"> + <rect width="129" height="20" rx="3" fill="#fff" /> + </mask> + <g mask="url(#anybadge_1)"> + <path fill="#555" d="M0 0h72v20H0z" /> + <path fill="#ff69b4" d="M72 0h57v20H72z" /> + <path fill="url(#b)" d="M0 0h129v20H0z" /> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="37.0" y="15" fill="#010101" fill-opacity=".3">code style</text> + <text x="36.0" y="14">code style</text> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="101.5" y="15" fill="#010101" fill-opacity=".3">prettier</text> + <text x="100.5" y="14">prettier</text> + </g> +</svg> diff --git a/.badges/licence-AGPL--3-blue.svg b/.badges/licence-AGPL--3-blue.svg new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmJhZGdlcy9saWNlbmNlLUFHUEwtLTMtYmx1ZS5zdmc= --- /dev/null +++ b/.badges/licence-AGPL--3-blue.svg @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<svg xmlns="http://www.w3.org/2000/svg" width="107" height="20"> + <linearGradient id="b" x2="0" y2="100%"> + <stop offset="0" stop-color="#bbb" stop-opacity=".1" /> + <stop offset="1" stop-opacity=".1" /> + </linearGradient> + <mask id="anybadge_1"> + <rect width="107" height="20" rx="3" fill="#fff" /> + </mask> + <g mask="url(#anybadge_1)"> + <path fill="#555" d="M0 0h53v20H0z" /> + <path fill="#0000FF" d="M53 0h54v20H53z" /> + <path fill="url(#b)" d="M0 0h107v20H0z" /> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="27.5" y="15" fill="#010101" fill-opacity=".3">licence</text> + <text x="26.5" y="14">licence</text> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="81.0" y="15" fill="#010101" fill-opacity=".3">AGPL-3</text> + <text x="80.0" y="14">AGPL-3</text> + </g> +</svg> diff --git a/.badges/maturity.svg b/.badges/maturity.svg new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmJhZGdlcy9tYXR1cml0eS5zdmc= --- /dev/null +++ b/.badges/maturity.svg @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<svg xmlns="http://www.w3.org/2000/svg" width="97" height="20"> + <linearGradient id="b" x2="0" y2="100%"> + <stop offset="0" stop-color="#bbb" stop-opacity=".1" /> + <stop offset="1" stop-opacity=".1" /> + </linearGradient> + <mask id="anybadge_1"> + <rect width="97" height="20" rx="3" fill="#fff" /> + </mask> + <g mask="url(#anybadge_1)"> + <path fill="#555" d="M0 0h61v20H0z" /> + <path fill="#DFB317" d="M61 0h36v20H61z" /> + <path fill="url(#b)" d="M0 0h97v20H0z" /> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="31.5" y="15" fill="#010101" fill-opacity=".3">maturity</text> + <text x="30.5" y="14">maturity</text> + </g> + <g + fill="#fff" + text-anchor="middle" + font-family="DejaVu Sans,Verdana,Geneva,sans-serif" + font-size="11" + > + <text x="80.0" y="15" fill="#010101" fill-opacity=".3">Beta</text> + <text x="79.0" y="14">Beta</text> + </g> +</svg> diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmVkaXRvcmNvbmZpZw== --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# Configuration for known file extensions +[*.{css,htm,html,js,json,jsx,less,markdown,md,py,rst,sass,scss,toml,xml,yaml,yml}] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{json,yml,yaml,rst,markdown,md,toml}] +indent_size = 2 + +# Do not configure editor for libs +[{*/static/{lib,src/lib}/**}] +charset = unset +end_of_line = unset +indent_size = unset +indent_style = unset +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmZsYWtlOA== --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +per-file-ignores= + __init__.py:F401 + __manifest__.py:B018 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmdpdGxhYi1jaS55bWw= --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,8 @@ +include: + - project: xcg/ci-templates + file: /odoo/13.0/gitlab-ci.yaml + +cfensure: + cache: + paths: + - dependency_modules-13.0 diff --git a/.hgconf b/.hgconf new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LmhnY29uZg== --- /dev/null +++ b/.hgconf @@ -0,0 +1,4 @@ +[document_attachment] +pulluri = https://orus.io/xcg/odoo-modules/document_attachment +layout = dependency_modules-13.0/document_attachment +track = 13.0.1.1.0 diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LnByZXR0aWVycmMueW1s --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,8 @@ +# Defaults for all prettier-supported languages. +# Prettier will complete this with settings from .editorconfig file. +bracketSpacing: false +printWidth: 88 +proseWrap: always +semi: true +trailingComma: "es5" +xmlWhitespaceSensitivity: "ignore" diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_LnlhbWxsaW50LnlhbWw= --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,4 @@ +rules: + document-start: disable + indentation: + indent-sequences: true diff --git a/NEWS.rst b/NEWS.rst new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_TkVXUy5yc3Q= --- /dev/null +++ b/NEWS.rst @@ -0,0 +1,8 @@ +========= +Changelog +========= + +13.0.1.0.0 +---------- + +Initial version. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_UkVBRE1FLnJzdA== --- /dev/null +++ b/README.rst @@ -0,0 +1,20 @@ +==================== +Template Odoo Module +==================== + +.. |maturity| image:: .badges/maturity.svg + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |license| image:: .badges/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |black| image:: .badges/code_style-black-000000.svg + :target: https://github.com/psf/black + :alt: Black +.. |prettier| image:: .badges/code_style-prettier-ff69b4.svg + :target: https://github.com/prettier/prettier + :alt: Prettier + +|maturity| |license| |black| |prettier| + +This module is a bridge between document attachment and hr. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_X19pbml0X18ucHk= --- /dev/null +++ b/__init__.py @@ -0,0 +1,1 @@ +from . import models diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_X19tYW5pZmVzdF9fLnB5 --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,32 @@ +############################################################################## +# +# Document Attachment HR, a module for Odoo +# Copyright © 2024 XCG Consulting (www.xcg-consulting.fr) +# +# Document Attachment HR is free software: you can redistribute it and/or +# modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# Document Attachment HR is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Document Attachment HR. If not, see +# <http://www.gnu.org/licenses/>. +# +############################################################################## +{ + "name": "Document Attachment HR", + "license": "AGPL-3", + "version": "13.0.1.0.0", + "category": "Technical", + "author": "XCG Consulting", + "website": "https://orbeet.io/", + "depends": ["document_attachment", "hr"], + "installable": True, + "auto_install": True, +} diff --git a/models/__init__.py b/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_bW9kZWxzL19faW5pdF9fLnB5 --- /dev/null +++ b/models/__init__.py @@ -0,0 +1,1 @@ +from . import hr_employee diff --git a/models/hr_employee.py b/models/hr_employee.py new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_bW9kZWxzL2hyX2VtcGxveWVlLnB5 --- /dev/null +++ b/models/hr_employee.py @@ -0,0 +1,27 @@ +############################################################################## +# +# Document Attachment HR, a module for Odoo +# Copyright © 2024 XCG Consulting (www.xcg-consulting.fr) +# +# Document Attachment HR is free software: you can redistribute it and/or +# modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# Document Attachment HR is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Document Attachment HR. If not, see +# <http://www.gnu.org/licenses/>. +# +############################################################################## +from odoo import fields, models + + +class HrEmployeePrivate(models.Model): + _inherit = "hr.employee" + message_main_document_id = fields.Many2one(groups="hr.group_hr_user") diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..720a3eb0863bd9aace86bf96f497684c3691a8ff_cHlwcm9qZWN0LnRvbWw= --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[tool.black] +line-length = 79 +target = 3.8 + +[tool.isort] +py_version = 38 +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +combine_as_imports = true +sections = [ + "FUTURE", + "STDLIB", + "SPECIAL_THIRD_PARTY", + "ODOO", + "ODOO_ADDONS", + "LOCALFOLDER", + "THIRDPARTY" +] +known_odoo = ["odoo"] +known_odoo_addons = ["odoo.addons"] +known_special_third_party = [ + "dateutil", + "lxml", + "mock", + "requests", + "minio", + "werkzeug" +] +default_section = "THIRDPARTY"