diff --git a/.copier-answers.yml b/.copier-answers.yml index a2b069525..909dd4086 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,15 +1,17 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.5.1 +_commit: v1.5.2 _src_path: https://github.com/OCA/oca-addons-repo-template.git ci: GitHub dependency_installation_mode: OCA generate_requirements_txt: true include_wkhtmltopdf: false odoo_version: 14.0 +org_name: Odoo Community Association (OCA) +org_slug: OCA rebel_module_groups: [] repo_description: All-in-One Property Management System (PMS) focused on medium-sizeations. repo_name: Property Management System repo_slug: pms +repo_website: https://github.com/OCA/pms travis_apt_packages: [] travis_apt_sources: [] - diff --git a/.eslintrc.yml b/.eslintrc.yml index d4cc423cc..9429bc688 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 06a555e73..a7a139046 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -2,7 +2,12 @@ name: pre-commit on: pull_request: + branches: + - "14.0*" push: + branches: + - "14.0" + - "14.0-ocabot-*" jobs: pre-commit: @@ -10,13 +15,6 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - 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.9.7" - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - uses: actions/cache@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1bc7b8b4c..1c4fe5171 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,8 @@ on: - "14.0*" push: branches: - - "14.0*" + - "14.0" + - "14.0-ocabot-*" jobs: unreleased-deps: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4fba2f21..15f991d59 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: 20.8b1 + rev: 22.3.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier @@ -120,7 +120,7 @@ repos: name: flake8 additional_dependencies: ["flake8-bugbear==20.1.4"] - repo: https://github.com/PyCQA/pylint - rev: pylint-2.5.3 + rev: v2.11.1 hooks: - id: pylint name: pylint with optional checks @@ -129,7 +129,7 @@ repos: - --exit-zero verbose: true additional_dependencies: &pylint_deps - - pylint-odoo==3.5.0 + - 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 af5b1191a..000000000 --- a/.t2d.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: python -cache: - directories: - - $HOME/.cache/pip - - $HOME/.cache/pre-commit - -python: - - "3.6" - -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" OPTIONS="--load - web,multi_pms_properties" - - stage: test - env: - - TESTS=1 ODOO_REPO="OCA/OCB" OPTIONS="--load web,multi_pms_properties" -env: - global: - - VERSION="14.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0" - -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 e57951105..9e41ee944 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/pms&target_branch=14.0) [![Pre-commit Status](https://github.com/OCA/pms/actions/workflows/pre-commit.yml/badge.svg?branch=14.0)](https://github.com/OCA/pms/actions/workflows/pre-commit.yml?query=branch%3A14.0) [![Build Status](https://github.com/OCA/pms/actions/workflows/test.yml/badge.svg?branch=14.0)](https://github.com/OCA/pms/actions/workflows/test.yml?query=branch%3A14.0) @@ -35,12 +36,11 @@ addon | version | maintainers | summary 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/pms/models/pms_checkin_partner.py b/pms/models/pms_checkin_partner.py index 363d64013..e5b52a40d 100644 --- a/pms/models/pms_checkin_partner.py +++ b/pms/models/pms_checkin_partner.py @@ -708,7 +708,7 @@ class PmsCheckinPartner(models.Model): return True def open_partner(self): - """ Utility method used to add an "View Customer" button in checkin partner views """ + """Utility method used to add an "View Customer" button in checkin partner views""" self.ensure_one() partner_form_id = self.env.ref("pms.view_partner_data_form").id return { diff --git a/pms/models/pms_folio.py b/pms/models/pms_folio.py index 6f3302fdb..e7549c981 100644 --- a/pms/models/pms_folio.py +++ b/pms/models/pms_folio.py @@ -1176,7 +1176,7 @@ class PmsFolio(models.Model): } def open_partner(self): - """ Utility method used to add an "View Customer" button in folio views """ + """Utility method used to add an "View Customer" button in folio views""" self.ensure_one() partner_form_id = self.env.ref("pms.view_partner_data_form").id return { diff --git a/pms/models/pms_reservation.py b/pms/models/pms_reservation.py index 9367b7ea3..3bef8d607 100644 --- a/pms/models/pms_reservation.py +++ b/pms/models/pms_reservation.py @@ -1685,7 +1685,7 @@ class PmsReservation(models.Model): # Action methods def open_partner(self): - """ Utility method used to add an "View Customer" button in reservation views """ + """Utility method used to add an "View Customer" button in reservation views""" self.ensure_one() partner_form_id = self.env.ref("pms.view_partner_data_form").id return { @@ -1787,7 +1787,7 @@ class PmsReservation(models.Model): def name_get(self): result = [] for res in self: - name = u"{} ({})".format(res.name, res.rooms if res.rooms else "No room") + name = "{} ({})".format(res.name, res.rooms if res.rooms else "No room") result.append((res.id, name)) return result diff --git a/pms/models/pms_reservation_line.py b/pms/models/pms_reservation_line.py index 48cc4177d..4da16632f 100644 --- a/pms/models/pms_reservation_line.py +++ b/pms/models/pms_reservation_line.py @@ -129,7 +129,7 @@ class PmsReservationLine(models.Model): result = [] for res in self: date = fields.Date.from_string(res.date) - name = u"{}/{}".format(date.day, date.month) + name = "{}/{}".format(date.day, date.month) result.append((res.id, name)) return result diff --git a/pms/models/pms_room_type.py b/pms/models/pms_room_type.py index b97cb1fa1..ef9bcffc4 100644 --- a/pms/models/pms_room_type.py +++ b/pms/models/pms_room_type.py @@ -186,7 +186,7 @@ class PmsRoomType(models.Model): # TODO: Review Check product fields default values to room @api.model def create(self, vals): - """ Add room types as not purchase services. """ + """Add room types as not purchase services.""" vals.update( { "purchase_ok": False, diff --git a/pms/tests/test_pms_folio_invoice.py b/pms/tests/test_pms_folio_invoice.py index c64412a17..8272eebaa 100644 --- a/pms/tests/test_pms_folio_invoice.py +++ b/pms/tests/test_pms_folio_invoice.py @@ -585,7 +585,7 @@ class TestPmsFolioInvoice(TestPms): line by unit prices/qty with nights""" def _test_autoinvoice_folio(self): - """ Test create and invoice the cron by partner preconfig automation """ + """Test create and invoice the cron by partner preconfig automation""" def _test_downpayment(self): """Test invoice qith a way of downpaument and check dowpayment's