diff --git a/.copier-answers.yml b/.copier-answers.yml
index ddad62d..333139e 100644
--- a/.copier-answers.yml
+++ b/.copier-answers.yml
@@ -1,14 +1,17 @@
# Do NOT update manually; changes here will be overwritten by Copier
-_commit: v1.3.6
+_commit: v1.5.2
_src_path: gh:oca/oca-addons-repo-template
ci: GitHub
dependency_installation_mode: PIP
generate_requirements_txt: true
include_wkhtmltopdf: false
odoo_version: 15.0
+org_name: Odoo Community Association (OCA)
+org_slug: OCA
rebel_module_groups: []
repo_description: 'TODO: add repo description.'
repo_name: vertical-travel
repo_slug: vertical-travel
+repo_website: https://github.com/OCA/vertical-travel
travis_apt_packages: []
travis_apt_sources: []
diff --git a/.eslintrc.yml b/.eslintrc.yml
index d4cc423..9429bc6 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -4,7 +4,7 @@ env:
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
- ecmaVersion: 2017
+ ecmaVersion: 2019
overrides:
- files:
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index 4ed0e92..9b5d86c 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -2,7 +2,12 @@ name: pre-commit
on:
pull_request:
+ branches:
+ - "15.0*"
push:
+ branches:
+ - "15.0"
+ - "15.0-ocabot-*"
jobs:
pre-commit:
@@ -10,11 +15,21 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
+ - name: Get python version
+ run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
+ - uses: actions/cache@v1
with:
- # The pylint-odoo version we use here does not support python 3.10
- # https://github.com/OCA/oca-addons-repo-template/issues/80
- # We also need to pin to an older version of python for older odoo versions
- # where we are not using black > 21. Older black versions won't work with
- # Python 3.9.8+, and we can't bump black without reformatting.
- python-version: "3.10"
- - uses: pre-commit/action@v2.0.0
+ path: ~/.cache/pre-commit
+ key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
+ - name: Install pre-commit
+ run: pip install pre-commit
+ - name: Run pre-commit
+ run: pre-commit run --all-files --show-diff-on-failure --color=always
+ - name: Check that all files generated by pre-commit are in git
+ run: |
+ newfiles="$(git ls-files --others --exclude-from=.gitignore)"
+ if [ "$newfiles" != "" ] ; then
+ echo "Please check-in the following files:"
+ echo "$newfiles"
+ exit 1
+ fi
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 8b0e56b..f231858 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,4 +1,4 @@
-name: test Odoo addons
+name: tests
on:
pull_request:
@@ -6,19 +6,40 @@ on:
- "15.0*"
push:
branches:
- - "15.0*"
+ - "15.0"
+ - "15.0-ocabot-*"
jobs:
+ unreleased-deps:
+ runs-on: ubuntu-latest
+ name: Detect unreleased dependencies
+ steps:
+ - uses: actions/checkout@v2
+ - run: |
+ for reqfile in requirements.txt test-requirements.txt ; do
+ if [ -f ${reqfile} ] ; then
+ result=0
+ # reject non-comment lines that contain a / (i.e. URLs, relative paths)
+ grep "^[^#].*/" ${reqfile} || result=$?
+ if [ $result -eq 0 ] ; then
+ echo "Unreleased dependencies found in ${reqfile}."
+ exit 1
+ fi
+ fi
+ done
test:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
+ name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest
makepot: "true"
+ name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.8-ocb15.0:latest
+ name: test with OCB
services:
postgres:
image: postgres:9.6
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 40b45ee..c61340a 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -46,7 +46,7 @@ repos:
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/psf/black
- rev: 21.9b0
+ rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
@@ -129,7 +129,7 @@ repos:
- --exit-zero
verbose: true
additional_dependencies: &pylint_deps
- - pylint-odoo==5.0.4
+ - pylint-odoo==5.0.5
- id: pylint
name: pylint with mandatory checks
args:
diff --git a/.t2d.yml b/.t2d.yml
deleted file mode 100644
index 4102ad5..0000000
--- a/.t2d.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-language: python
-cache:
- directories:
- - $HOME/.cache/pip
- - $HOME/.cache/pre-commit
-
-python:
- - "3.8"
-
-addons:
- postgresql: "9.6"
- apt:
- packages:
- - expect-dev # provides unbuffer utility
-
-stages:
- - test
-
-jobs:
- include:
- - stage: test
- env:
- - TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1"
- - stage: test
- env:
- - TESTS=1 ODOO_REPO="OCA/OCB"
-env:
- global:
- - VERSION="15.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
- - MQT_DEP=PIP
-
-install:
- - git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git
- ${HOME}/maintainer-quality-tools
- - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- - travis_install_nightly
-
-script:
- - travis_run_tests
-
-after_success:
- - travis_after_tests_success
diff --git a/README.md b/README.md
index 936547b..02a0f10 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
-[](https://runbot.odoo-community.org/runbot/repo/github-com-oca-vertical-travel-161)
-[](https://travis-ci.com/OCA/vertical-travel)
+
+[](https://runboat.odoo-community.org/builds?repo=OCA/vertical-travel&target_branch=15.0)
+[](https://github.com/OCA/vertical-travel/actions/workflows/pre-commit.yml?query=branch%3A15.0)
+[](https://github.com/OCA/vertical-travel/actions/workflows/test.yml?query=branch%3A15.0)
[](https://codecov.io/gh/OCA/vertical-travel)
[](https://translation.odoo-community.org/engage/vertical-travel-15-0/?utm_source=widget)
@@ -25,12 +27,11 @@ This part will be replaced when running the oca-gen-addons-table script from OCA
This repository is licensed under [AGPL-3.0](LICENSE).
-However, each module can have a totally different license, as long as they adhere to OCA
+However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA)
policy. Consult each module's `__manifest__.py` file, which contains a `license` key
that explains its license.
----
-
OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit
organization whose mission is to support the collaborative development of Odoo features
and promote its widespread use.
diff --git a/passport_expiration/README.rst b/passport_expiration/README.rst
new file mode 100644
index 0000000..e69de29
diff --git a/passport_expiration/__init__.py b/passport_expiration/__init__.py
new file mode 100644
index 0000000..0650744
--- /dev/null
+++ b/passport_expiration/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/passport_expiration/__manifest__.py b/passport_expiration/__manifest__.py
new file mode 100644
index 0000000..3b5cd16
--- /dev/null
+++ b/passport_expiration/__manifest__.py
@@ -0,0 +1,17 @@
+# Copyright 2013 Savoir-faire Linux
+# Copyright 2021 Camptocamp SA
+# Copyright 2022 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+{
+ "name": "Passport Expiration",
+ "version": "15.0.0.1.0",
+ "author": "Savoir-faire Linux,Odoo Community Association (OCA)",
+ "website": "https://github.com/OCA/vertical-travel",
+ "license": "AGPL-3",
+ "summary": "Adds an expiration date for passports",
+ "depends": ["hr"],
+ "data": [
+ "views/hr_view.xml",
+ ],
+ "installable": True,
+}
diff --git a/passport_expiration/i18n/fr.po b/passport_expiration/i18n/fr.po
new file mode 100644
index 0000000..3d3a78b
--- /dev/null
+++ b/passport_expiration/i18n/fr.po
@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * passport_expiration
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0+e\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-10-05 16:24+0000\n"
+"PO-Revision-Date: 2021-10-05 16:24+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee__display_name
+msgid "Display Name"
+msgstr "Nom affiché"
+
+#. module: passport_expiration
+#: model:ir.model,name:passport_expiration.model_hr_employee
+msgid "Employee"
+msgstr "Employé"
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee__passport_expiration_date
+msgid "Expiration Date"
+msgstr "Date d'expiration"
+
+#. module: passport_expiration
+#: model:ir.model.fields,help:passport_expiration.field_hr_employee__passport_expiration_date
+msgid "Expiration date of the passport."
+msgstr "Date d'expiration du passeport."
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee__id
+msgid "ID"
+msgstr ""
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee____last_update
+msgid "Last Modified on"
+msgstr "Dernière modification le"
diff --git a/passport_expiration/i18n/passport_expiration.pot b/passport_expiration/i18n/passport_expiration.pot
new file mode 100644
index 0000000..9638ee4
--- /dev/null
+++ b/passport_expiration/i18n/passport_expiration.pot
@@ -0,0 +1,44 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * passport_expiration
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: passport_expiration
+#: model:ir.model,name:passport_expiration.model_hr_employee
+msgid "Employee"
+msgstr ""
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee__passport_expiration_date
+msgid "Expiration Date"
+msgstr ""
+
+#. module: passport_expiration
+#: model:ir.model.fields,help:passport_expiration.field_hr_employee__passport_expiration_date
+msgid "Expiration date of the passport."
+msgstr ""
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee__id
+msgid "ID"
+msgstr ""
+
+#. module: passport_expiration
+#: model:ir.model.fields,field_description:passport_expiration.field_hr_employee____last_update
+msgid "Last Modified on"
+msgstr ""
diff --git a/passport_expiration/models/__init__.py b/passport_expiration/models/__init__.py
new file mode 100644
index 0000000..b80db13
--- /dev/null
+++ b/passport_expiration/models/__init__.py
@@ -0,0 +1 @@
+from . import hr
diff --git a/passport_expiration/models/hr.py b/passport_expiration/models/hr.py
new file mode 100644
index 0000000..3efd3eb
--- /dev/null
+++ b/passport_expiration/models/hr.py
@@ -0,0 +1,14 @@
+# Copyright 2013 Savoir-faire Linux
+# Copyright 2021 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from odoo import fields, models
+
+
+class HrEmployee(models.Model):
+ _inherit = "hr.employee"
+
+ passport_expiration_date = fields.Date(
+ "Expiration Date",
+ help="Expiration date of the passport.",
+ groups="hr.group_hr_user",
+ )
diff --git a/passport_expiration/readme/CONTRIBUTORS.rst b/passport_expiration/readme/CONTRIBUTORS.rst
new file mode 100644
index 0000000..0139c22
--- /dev/null
+++ b/passport_expiration/readme/CONTRIBUTORS.rst
@@ -0,0 +1,3 @@
+Savoir-faire Linux
+
+Camptocamp SA
diff --git a/passport_expiration/readme/DESCRIPTION.rst b/passport_expiration/readme/DESCRIPTION.rst
new file mode 100644
index 0000000..1480eac
--- /dev/null
+++ b/passport_expiration/readme/DESCRIPTION.rst
@@ -0,0 +1 @@
+This module used to provides a 'passport expiration' field on employee form view.
diff --git a/passport_expiration/readme/USAGE.rst b/passport_expiration/readme/USAGE.rst
new file mode 100644
index 0000000..401dda4
--- /dev/null
+++ b/passport_expiration/readme/USAGE.rst
@@ -0,0 +1,3 @@
+To use this module, you need to:
+
+#. Go to the employee form view and fill the field **passport expiration** .
diff --git a/passport_expiration/static/description/icon.png b/passport_expiration/static/description/icon.png
new file mode 100644
index 0000000..3a0328b
Binary files /dev/null and b/passport_expiration/static/description/icon.png differ
diff --git a/passport_expiration/static/description/index.html b/passport_expiration/static/description/index.html
new file mode 100644
index 0000000..ef4741a
--- /dev/null
+++ b/passport_expiration/static/description/index.html
@@ -0,0 +1,426 @@
+
+
+
+
+
+
+Passport Expiration
+
+
+
+
+
Passport Expiration
+
+
+

+
This module used to provides a ‘passport expiration’ field on employee form view.
+
Table of contents
+
+
+
+
To use this module, you need to:
+
+- Go to the employee form view and fill the field passport expiration .
+
+
+
+
+
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 smashing it by providing a detailed and welcomed
+feedback.
+
Do not contact contributors directly about support or help with technical issues.
+
+
+
+
+
+
+
Savoir-faire Linux
+
Camptocamp SA
+
+
+
+
This module is maintained by the OCA.
+

+
OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
This module is part of the OCA/vertical-travel project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
+
+
+
+
+
diff --git a/passport_expiration/views/hr_view.xml b/passport_expiration/views/hr_view.xml
new file mode 100644
index 0000000..3f17bd1
--- /dev/null
+++ b/passport_expiration/views/hr_view.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ hr.employee
+
+
+
+
+
+
+
+
+
+
+
diff --git a/setup/passport_expiration/odoo/addons/passport_expiration b/setup/passport_expiration/odoo/addons/passport_expiration
new file mode 120000
index 0000000..a764b50
--- /dev/null
+++ b/setup/passport_expiration/odoo/addons/passport_expiration
@@ -0,0 +1 @@
+../../../../passport_expiration
\ No newline at end of file
diff --git a/setup/passport_expiration/setup.py b/setup/passport_expiration/setup.py
new file mode 100644
index 0000000..28c57bb
--- /dev/null
+++ b/setup/passport_expiration/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)