From f802197fb4b719de58e18c33998380e31f464d2d Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 30 Mar 2022 19:06:57 +0200 Subject: [PATCH 1/3] Updated from template - Switch to Github actions --- .copier-answers.yml | 14 +++++--- .github/workflows/test.yml | 69 ++++++++++++++++++++++++++++++++++++++ .gitignore | 1 - .pre-commit-config.yaml | 12 +++---- .travis.yml | 42 ----------------------- README.md | 7 ++-- 6 files changed, 87 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.copier-answers.yml b/.copier-answers.yml index 39a887169..f83f67a8b 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,17 +1,23 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.7.0 +_commit: v1.8.0 _src_path: gh:oca/oca-addons-repo-template -ci: Travis +ci: GitHub dependency_installation_mode: PIP generate_requirements_txt: true +github_check_license: true +github_enable_codecov: true +github_enable_makepot: true +github_enable_stale_action: true +github_enforce_dev_status_compatibility: true include_wkhtmltopdf: false odoo_version: 14.0 org_name: Odoo Community Association (OCA) org_slug: OCA rebel_module_groups: [] -repo_description: 'TODO: add repo description.' -repo_name: stock-logistics-warehouse +repo_description: Odoo Warehouse Management Addons +repo_name: Stock Logistics Warehouse modules repo_slug: stock-logistics-warehouse repo_website: https://github.com/OCA/stock-logistics-warehouse travis_apt_packages: [] travis_apt_sources: [] + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..1c4fe5171 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,69 @@ +name: tests + +on: + pull_request: + branches: + - "14.0*" + push: + branches: + - "14.0" + - "14.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.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 + services: + postgres: + image: postgres:9.6 + env: + POSTGRES_USER: odoo + POSTGRES_PASSWORD: odoo + POSTGRES_DB: odoo + ports: + - 5432:5432 + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Install addons and dependencies + run: oca_install_addons + - name: Check licenses + run: manifestoo -d . check-licenses + - name: Check development status + run: manifestoo -d . check-dev-status --default-dev-status=Beta + - name: Initialize test db + run: oca_init_test_database + - name: Run tests + run: oca_run_tests + - uses: codecov/codecov-action@v1 + - name: Update .pot files + run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} + if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} diff --git a/.gitignore b/.gitignore index 818770fb1..9c283fd41 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ build/ develop-eggs/ dist/ eggs/ -lib/ lib64/ parts/ sdist/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70b6e6c46..7ca97710c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -119,19 +119,15 @@ repos: - id: flake8 name: flake8 additional_dependencies: ["flake8-bugbear==20.1.4"] - - repo: https://github.com/PyCQA/pylint - rev: v2.11.1 + - repo: https://github.com/OCA/pylint-odoo + rev: 7.0.0 hooks: - - id: pylint + - id: pylint_odoo name: pylint with optional checks args: - --rcfile=.pylintrc - --exit-zero verbose: true - additional_dependencies: &pylint_deps - - pylint-odoo==5.0.5 - - id: pylint - name: pylint with mandatory checks + - id: pylint_odoo args: - --rcfile=.pylintrc-mandatory - additional_dependencies: *pylint_deps diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5e8e3a666..000000000 --- a/.travis.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" - - stage: test - env: - - TESTS=1 ODOO_REPO="OCA/OCB" -env: - global: - - VERSION="14.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 5e72d835d..3330a631b 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=14.0) -[![Build Status](https://travis-ci.com/OCA/stock-logistics-warehouse.svg?branch=14.0)](https://travis-ci.com/OCA/stock-logistics-warehouse) +[![Pre-commit Status](https://github.com/OCA/stock-logistics-warehouse/actions/workflows/pre-commit.yml/badge.svg?branch=14.0)](https://github.com/OCA/stock-logistics-warehouse/actions/workflows/pre-commit.yml?query=branch%3A14.0) +[![Build Status](https://github.com/OCA/stock-logistics-warehouse/actions/workflows/test.yml/badge.svg?branch=14.0)](https://github.com/OCA/stock-logistics-warehouse/actions/workflows/test.yml?query=branch%3A14.0) [![codecov](https://codecov.io/gh/OCA/stock-logistics-warehouse/branch/14.0/graph/badge.svg)](https://codecov.io/gh/OCA/stock-logistics-warehouse) [![Translation Status](https://translation.odoo-community.org/widgets/stock-logistics-warehouse-14-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/stock-logistics-warehouse-14-0/?utm_source=widget) -# stock-logistics-warehouse +# Stock Logistics Warehouse modules -TODO: add repo description. +Odoo Warehouse Management Addons From aae07c5c012366c55b7dd2a1ba3d55e1d040bcb3 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Mon, 5 Sep 2022 10:01:09 +0200 Subject: [PATCH 2/3] [FIX] Licensing issues --- stock_pull_list/__manifest__.py | 4 ++-- stock_pull_list/tests/common.py | 2 +- stock_pull_list/tests/test_stock_pull_list.py | 2 +- stock_pull_list/wizards/stock_pull_list_wizard.py | 2 +- stock_pull_list/wizards/stock_pull_list_wizard.xml | 2 +- stock_request_analytic/__manifest__.py | 4 ++-- stock_request_analytic/models/analytic.py | 2 +- stock_request_analytic/models/stock_request.py | 2 +- stock_request_analytic/models/stock_request_order.py | 2 +- stock_request_analytic/models/stock_rule.py | 2 +- stock_request_analytic/tests/test_stock_request_analytic.py | 2 +- stock_request_analytic/views/analytic_views.xml | 2 +- stock_request_analytic/views/stock_request_order_views.xml | 2 +- stock_request_analytic/views/stock_request_views.xml | 2 +- stock_vertical_lift_qty_by_packaging/__manifest__.py | 2 +- .../models/vertical_lift_operation_base.py | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/stock_pull_list/__manifest__.py b/stock_pull_list/__manifest__.py index 7609dc08a..2e8e541bd 100644 --- a/stock_pull_list/__manifest__.py +++ b/stock_pull_list/__manifest__.py @@ -1,12 +1,12 @@ # Copyright 2020 ForgeFlow, S.L. -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Stock Pull List", "summary": "The pull list checks the stock situation and calculates " "needed quantities.", "version": "14.0.1.1.1", - "license": "LGPL-3", + "license": "AGPL-3", "website": "https://github.com/OCA/stock-logistics-warehouse", "author": "ForgeFlow, " "Odoo Community Association (OCA)", "maintainers": ["LoisRForgeFlow"], diff --git a/stock_pull_list/tests/common.py b/stock_pull_list/tests/common.py index cb3acdfd2..4aa41ea54 100644 --- a/stock_pull_list/tests/common.py +++ b/stock_pull_list/tests/common.py @@ -1,5 +1,5 @@ # Copyright 2020 ForgeFlow, S.L. -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from datetime import timedelta as td diff --git a/stock_pull_list/tests/test_stock_pull_list.py b/stock_pull_list/tests/test_stock_pull_list.py index 68d410382..7c13bf38f 100644 --- a/stock_pull_list/tests/test_stock_pull_list.py +++ b/stock_pull_list/tests/test_stock_pull_list.py @@ -1,5 +1,5 @@ # Copyright 2020 ForgeFlow, S.L. -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from .common import TestPullListCommon diff --git a/stock_pull_list/wizards/stock_pull_list_wizard.py b/stock_pull_list/wizards/stock_pull_list_wizard.py index a695f3338..a72016bfd 100644 --- a/stock_pull_list/wizards/stock_pull_list_wizard.py +++ b/stock_pull_list/wizards/stock_pull_list_wizard.py @@ -1,5 +1,5 @@ # Copyright 2020 ForgeFlow, S.L. -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import itertools diff --git a/stock_pull_list/wizards/stock_pull_list_wizard.xml b/stock_pull_list/wizards/stock_pull_list_wizard.xml index ff75540b6..cef9c5aa0 100644 --- a/stock_pull_list/wizards/stock_pull_list_wizard.xml +++ b/stock_pull_list/wizards/stock_pull_list_wizard.xml @@ -1,5 +1,5 @@ + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> stock.pull.list.wizard.form diff --git a/stock_request_analytic/__manifest__.py b/stock_request_analytic/__manifest__.py index a3ff07ca4..cde3ef88f 100644 --- a/stock_request_analytic/__manifest__.py +++ b/stock_request_analytic/__manifest__.py @@ -1,11 +1,11 @@ # Copyright 2017-2020 ForgeFlow, S.L. (https://www.forgeflow.com) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Stock Request Analytic", "summary": "Internal request for stock", "version": "14.0.1.0.2", - "license": "LGPL-3", + "license": "AGPL-3", "website": "https://github.com/OCA/stock-logistics-warehouse", "author": "ForgeFlow, Odoo Community Association (OCA)", "category": "Analytic", diff --git a/stock_request_analytic/models/analytic.py b/stock_request_analytic/models/analytic.py index 3a3339e59..a3d4bc2da 100644 --- a/stock_request_analytic/models/analytic.py +++ b/stock_request_analytic/models/analytic.py @@ -1,5 +1,5 @@ # Copyright 2017-2020 ForgeFlow, S.L. (https://www.forgeflow.com) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models diff --git a/stock_request_analytic/models/stock_request.py b/stock_request_analytic/models/stock_request.py index 712aa8ec1..8804d236f 100644 --- a/stock_request_analytic/models/stock_request.py +++ b/stock_request_analytic/models/stock_request.py @@ -1,6 +1,6 @@ # Copyright 2017-2020 ForgeFlow, S.L. (https://www.forgeflow.com) # Copyright 2021 Tecnativa - João Marques -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models diff --git a/stock_request_analytic/models/stock_request_order.py b/stock_request_analytic/models/stock_request_order.py index 8d610518f..825e7e677 100644 --- a/stock_request_analytic/models/stock_request_order.py +++ b/stock_request_analytic/models/stock_request_order.py @@ -1,5 +1,5 @@ # Copyright 2018 Creu Blanca -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import _, api, fields, models from odoo.exceptions import ValidationError diff --git a/stock_request_analytic/models/stock_rule.py b/stock_request_analytic/models/stock_rule.py index 8ce90f47c..8ed490f1f 100644 --- a/stock_request_analytic/models/stock_rule.py +++ b/stock_request_analytic/models/stock_rule.py @@ -1,5 +1,5 @@ # Copyright 2017-2020 ForgeFlow, S.L. (https://www.forgeflow.com) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import models diff --git a/stock_request_analytic/tests/test_stock_request_analytic.py b/stock_request_analytic/tests/test_stock_request_analytic.py index 98ed1b7ae..8afae2882 100644 --- a/stock_request_analytic/tests/test_stock_request_analytic.py +++ b/stock_request_analytic/tests/test_stock_request_analytic.py @@ -1,5 +1,5 @@ # Copyright 2017-2020 ForgeFlow, S.L. (https://www.forgeflow.com) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields from odoo.exceptions import UserError diff --git a/stock_request_analytic/views/analytic_views.xml b/stock_request_analytic/views/analytic_views.xml index 8c0807452..1f77af7a2 100644 --- a/stock_request_analytic/views/analytic_views.xml +++ b/stock_request_analytic/views/analytic_views.xml @@ -1,6 +1,6 @@ + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0) --> analytic.order.form diff --git a/stock_request_analytic/views/stock_request_order_views.xml b/stock_request_analytic/views/stock_request_order_views.xml index 05af1e48b..c497290ed 100644 --- a/stock_request_analytic/views/stock_request_order_views.xml +++ b/stock_request_analytic/views/stock_request_order_views.xml @@ -1,6 +1,6 @@ + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> stock.request.order.form - stock_request_analytic diff --git a/stock_request_analytic/views/stock_request_views.xml b/stock_request_analytic/views/stock_request_views.xml index e39f74bda..4e3b124f2 100644 --- a/stock_request_analytic/views/stock_request_views.xml +++ b/stock_request_analytic/views/stock_request_views.xml @@ -1,6 +1,6 @@ + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> stock.request.form diff --git a/stock_vertical_lift_qty_by_packaging/__manifest__.py b/stock_vertical_lift_qty_by_packaging/__manifest__.py index 62cbf4b67..5f495b24b 100644 --- a/stock_vertical_lift_qty_by_packaging/__manifest__.py +++ b/stock_vertical_lift_qty_by_packaging/__manifest__.py @@ -10,7 +10,7 @@ "category": "Warehouse Management", "website": "https://github.com/OCA/stock-logistics-warehouse", "author": "Camptocamp, Odoo Community Association (OCA)", - "license": "LGPL-3", + "license": "AGPL-3", "application": False, "installable": True, "auto_install": True, diff --git a/stock_vertical_lift_qty_by_packaging/models/vertical_lift_operation_base.py b/stock_vertical_lift_qty_by_packaging/models/vertical_lift_operation_base.py index 2fc36e228..e2202bd12 100644 --- a/stock_vertical_lift_qty_by_packaging/models/vertical_lift_operation_base.py +++ b/stock_vertical_lift_qty_by_packaging/models/vertical_lift_operation_base.py @@ -1,5 +1,5 @@ # Copyright 2020 Camptocamp SA -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models From 81727977b4d8d481ab4aaa8ae3fff419e0b135cf Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Mon, 5 Sep 2022 10:04:36 +0200 Subject: [PATCH 3/3] [FIX] Development statuses --- stock_cycle_count/__manifest__.py | 1 - stock_location_bin_name/__manifest__.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/stock_cycle_count/__manifest__.py b/stock_cycle_count/__manifest__.py index 6f97de059..17e315df6 100644 --- a/stock_cycle_count/__manifest__.py +++ b/stock_cycle_count/__manifest__.py @@ -6,7 +6,6 @@ "summary": "Adds the capability to schedule cycle counts in a " "warehouse through different rules defined by the user.", "version": "14.0.1.2.0", - "development_status": "Mature", "maintainers": ["LoisRForgeFlow"], "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/stock-logistics-warehouse", diff --git a/stock_location_bin_name/__manifest__.py b/stock_location_bin_name/__manifest__.py index 57a3dabd8..c37ca63cf 100644 --- a/stock_location_bin_name/__manifest__.py +++ b/stock_location_bin_name/__manifest__.py @@ -12,6 +12,6 @@ "depends": ["stock_location_zone", "stock_location_position"], "data": ["views/stock_location.xml"], "installable": True, - "development_status": "Beta", + "development_status": "Alpha", "license": "AGPL-3", }