diff --git a/.copier-answers.yml b/.copier-answers.yml index a166505b5f..02e40898d6 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,7 +1,8 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.17.2 +_commit: v1.21.1 _src_path: gh:oca/oca-addons-repo-template ci: GitHub +convert_readme_fragments_to_markdown: false generate_requirements_txt: true github_check_license: true github_ci_extra_env: {} @@ -19,4 +20,6 @@ repo_description: 'TODO: add repo description.' repo_name: project repo_slug: project repo_website: https://github.com/OCA/project +use_pyproject_toml: false +use_ruff: false diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1693a1253b..fa17fcd4e8 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Stale PRs and issues policy - uses: actions/stale@v4 + uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} # General settings. @@ -48,7 +48,7 @@ jobs: # * Issues that are pending more information # * Except Issues marked as "no stale" - name: Needs more information stale issues policy - uses: actions/stale@v4 + uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} ascending: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1af7438fa..3bf18e843c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,9 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} - 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 9c283fd41f..0090721f5d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ *.py[cod] /.venv /.pytest_cache +/.ruff_cache # C extensions *.so diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f82c55cfd..08621db94b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,10 @@ exclude: | ^docs/_templates/.*\.html$| # Don't bother non-technical authors with formatting issues in docs readme/.*\.(rst|md)$| + # Ignore build and dist directories in addons + /build/|/dist/| + # Ignore test files in addons + /tests/samples/.*| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: @@ -35,7 +39,7 @@ repos: language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools - rev: 969238e47c07d0c40573acff81d170f63245d738 + rev: 9a170331575a265c092ee6b24b845ec508e8ef75 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -48,6 +52,7 @@ repos: - --org-name=OCA - --repo-name=project - --if-source-changed + - --keep-source-digest - repo: https://github.com/OCA/odoo-pre-commit-hooks rev: v0.0.25 hooks: diff --git a/README.md b/README.md index b432189c0c..c67d732960 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,14 @@ addon | version | maintainers | summary [project_hr](project_hr/) | 16.0.1.0.0 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Link HR with project [project_key](project_key/) | 16.0.1.0.0 | | Module decorates projects and tasks with Project Key [project_list](project_list/) | 16.0.1.0.0 | | Projects list view +[project_milestone_tree](project_milestone_tree/) | 16.0.1.0.0 | | This module adds an access to the Milestone tree view. [project_parent](project_parent/) | 16.0.1.0.0 | | Project Parent -[project_parent_task_filter](project_parent_task_filter/) | 16.0.1.0.0 | | Add a filter to show the parent tasks +[project_parent_task_filter](project_parent_task_filter/) | 16.0.1.1.0 | | Add a filter to show the parent tasks [project_purchase_link](project_purchase_link/) | 16.0.1.0.0 | | Project Purchase Link -[project_role](project_role/) | 16.0.1.0.3 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Project role-based roster +[project_role](project_role/) | 16.0.1.0.4 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Project role-based roster [project_sequence](project_sequence/) | 16.0.1.0.0 | [![yajo](https://github.com/yajo.png?size=30px)](https://github.com/yajo) [![anddago78](https://github.com/anddago78.png?size=30px)](https://github.com/anddago78) | Add a sequence field to projects, filled automatically [project_stage_extra_info](project_stage_extra_info/) | 16.0.1.0.0 | | Project Stage Extra Info -[project_stock](project_stock/) | 16.0.1.0.2 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Project Stock +[project_stock](project_stock/) | 16.0.1.2.0 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Project Stock [project_stock_analytic_tag](project_stock_analytic_tag/) | 16.0.1.0.0 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Project Stock Analytic Tag [project_stock_product_set](project_stock_product_set/) | 16.0.2.0.0 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) | Project Stock Product Set [project_task_add_very_high](project_task_add_very_high/) | 16.0.1.0.0 | [![astirpe](https://github.com/astirpe.png?size=30px)](https://github.com/astirpe) | Adds extra options 'High' and 'Very High' on tasks @@ -41,6 +42,7 @@ addon | version | maintainers | summary [project_task_default_stage](project_task_default_stage/) | 16.0.1.0.1 | | Recovery default task stages for projects from v8 [project_task_link](project_task_link/) | 16.0.1.0.1 | | Project Task Link [project_task_material](project_task_material/) | 16.0.1.0.0 | | Record products spent in a Task +[project_task_name_with_id](project_task_name_with_id/) | 16.0.1.0.0 | | Project Task Name with ID [project_task_note](project_task_note/) | 16.0.1.0.0 | [![carolina-fernandez](https://github.com/carolina-fernandez.png?size=30px)](https://github.com/carolina-fernandez) | Add notes in project tasks [project_task_personal_stage_auto_fold](project_task_personal_stage_auto_fold/) | 16.0.1.0.0 | | Moves task to the first fold personal stage when done [project_task_pull_request](project_task_pull_request/) | 16.0.1.0.0 | | Adds a field for a PR URI to project tasks diff --git a/project_duplicate_subtask/i18n/hr.po b/project_duplicate_subtask/i18n/hr.po new file mode 100644 index 0000000000..ac56682493 --- /dev/null +++ b/project_duplicate_subtask/i18n/hr.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_duplicate_subtask +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-06-18 11:59+0000\n" +"Last-Translator: Bole \n" +"Language-Team: none\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.17\n" + +#. module: project_duplicate_subtask +#: model:ir.actions.server,name:project_duplicate_subtask.action_server_duplicate_subtasks +msgid "Duplicate with subtasks" +msgstr "Dupliciraj sa podzadacima" + +#. module: project_duplicate_subtask +#: model:ir.model,name:project_duplicate_subtask.model_project_task +msgid "Task" +msgstr "Zadatak" diff --git a/project_forecast_line_bokeh_chart/README.rst b/project_forecast_line_bokeh_chart/README.rst new file mode 100644 index 0000000000..fdc344768a --- /dev/null +++ b/project_forecast_line_bokeh_chart/README.rst @@ -0,0 +1,81 @@ +================================== +Project Forecast Lines Bokeh Chart +================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:ffc547b9adf4dc8185327b6dc1a286a9948f476e55a9f34ceef5c6127a170e8b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/licence-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-OCA%2Fproject-lightgray.png?logo=github + :target: https://github.com/OCA/project/tree/16.0/project_forecast_line_bokeh_chart + :alt: OCA/project +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_forecast_line_bokeh_chart + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module improves the reports of project_forecast_line by using the bokeh widget available in OCA/web. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +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 +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp SA + +Contributors +~~~~~~~~~~~~ + +* Alexandre Fayolle + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/project `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/project_forecast_line_bokeh_chart/__init__.py b/project_forecast_line_bokeh_chart/__init__.py new file mode 100644 index 0000000000..4c4f242fa0 --- /dev/null +++ b/project_forecast_line_bokeh_chart/__init__.py @@ -0,0 +1 @@ +from . import report diff --git a/project_forecast_line_bokeh_chart/__manifest__.py b/project_forecast_line_bokeh_chart/__manifest__.py new file mode 100644 index 0000000000..21f68e57fb --- /dev/null +++ b/project_forecast_line_bokeh_chart/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Project Forecast Lines Bokeh Chart", + "summary": "Project Forecast Lines Bokeh Chart", + "version": "16.0.1.0.0", + "author": "Camptocamp SA, Odoo Community Association (OCA)", + "license": "AGPL-3", + "category": "Project", + "website": "https://github.com/OCA/project", + "depends": ["project_forecast_line", "web_widget_bokeh_chart"], + "data": [ + "security/ir.model.access.csv", + "report/forecast_line_reporting_views.xml", + ], + "development_status": "Alpha", + "installable": True, +} diff --git a/project_forecast_line_bokeh_chart/i18n/es.po b/project_forecast_line_bokeh_chart/i18n/es.po new file mode 100644 index 0000000000..6af354f0e6 --- /dev/null +++ b/project_forecast_line_bokeh_chart/i18n/es.po @@ -0,0 +1,142 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_forecast_line_bokeh_chart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-09 07:43+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Available" +msgstr "Disponible" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__bokeh_chart +msgid "Bokeh Chart" +msgstr "Gráfico Bokeh" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__date_from +msgid "Date From" +msgstr "Fecha desde" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__day +msgid "Day" +msgstr "Día" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__display_name +msgid "Display Name" +msgstr "Mostrar Nombre" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__employee_ids +msgid "Employee" +msgstr "Empleado/a" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting +#: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.view_forecast_line_reporting +msgid "Forecast Reporting" +msgstr "Informes de previsión" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model,name:project_forecast_line_bokeh_chart.model_forecast_line_reporting +msgid "Forecast reporting wizard" +msgstr "Asistente de informes de previsiones" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__granularity +msgid "Granularity" +msgstr "Granularidad" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__id +msgid "ID" +msgstr "ID (identificación)" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting____last_update +msgid "Last Modified on" +msgstr "Última Modificación el" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_uid +msgid "Last Updated by" +msgstr "Actualizado por Última vez por" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_date +msgid "Last Updated on" +msgstr "Última Actualización el" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__month +msgid "Month" +msgstr "Mes" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__nb_months +msgid "Nb Months" +msgstr "Meses Nb" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Not assigned to an employee" +msgstr "No asignado a un empleado" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Nothing to plot. Select some employees" +msgstr "Nada que trazar. Seleccione algunos empleados" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Overload" +msgstr "Sobrecarga" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "Project" +msgstr "Proyecto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,help:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "" +"Setting this will automatically add all employees assigned to tasks on the " +"project" +msgstr "" +"Al establecer esta opción, se añadirán automáticamente todos los empleados " +"asignados a las tareas del proyecto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__week +msgid "Week" +msgstr "Semana" diff --git a/project_forecast_line_bokeh_chart/i18n/fr.po b/project_forecast_line_bokeh_chart/i18n/fr.po new file mode 100644 index 0000000000..f3ef41984d --- /dev/null +++ b/project_forecast_line_bokeh_chart/i18n/fr.po @@ -0,0 +1,181 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_forecast_line_bokeh_chart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-09 13:06+0000\n" +"PO-Revision-Date: 2021-09-10 14:59+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: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Available" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__bokeh_chart +msgid "Bokeh Chart" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_uid +msgid "Created by" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_date +msgid "Created on" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__date_from +msgid "Date From" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__day +msgid "Day" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__employee_ids +msgid "Employee" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting +#: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.view_forecast_line_reporting +msgid "Forecast Reporting" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model,name:project_forecast_line_bokeh_chart.model_forecast_line_reporting +msgid "Forecast reporting wizard" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__granularity +msgid "Granularity" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__id +msgid "ID" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_date +#, fuzzy +msgid "Last Updated on" +msgstr "Dernière modification le" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__month +msgid "Month" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__nb_months +msgid "Nb Months" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Not assigned to an employee" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Nothing to plot. Select some employees" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Overload" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "Project" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,help:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "" +"Setting this will automatically add all employees assigned to tasks on the " +"project" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__week +msgid "Week" +msgstr "" + +#, fuzzy +#~ msgid "Sale line" +#~ msgstr "Bon de commande" + +#~ msgid "Sales Order" +#~ msgstr "Bon de commande" + +#, fuzzy +#~ msgid "Sales Order Line" +#~ msgstr "Bon de commande" + +#~ msgid "Indicate if a signed contract has been received for this SO" +#~ msgstr "Indique si un contrat signé a été reçu pour cette commande" + +#~ msgid "Log reception of signed contract" +#~ msgstr "Enregistrer la réception d'un contrat signé" + +#~ msgid "Missing contract" +#~ msgstr "Contrat manquant" + +#~ msgid "Record when the SO has (most recently) been marked as signed " +#~ msgstr "" +#~ "Enregistre quand la commande a été marquée comme signée (le plus " +#~ "récemment)" + +#~ msgid "Signed Date" +#~ msgstr "Date de signature" + +#~ msgid "Signed Status" +#~ msgstr "Statut signature" + +#~ msgid "" +#~ "You are not allowed to change the signed status of Sales Orders.\n" +#~ "Only members of the 'Log reception of signed contract' group can." +#~ msgstr "" +#~ "Vous n'êtes pas autorisé à changer le statut de signature des commandes " +#~ "de vente.\n" +#~ "Seuls les membres du goupe 'Enregistrer la réception d'un contrat signé' " +#~ "le peuvent." diff --git a/project_forecast_line_bokeh_chart/i18n/it.po b/project_forecast_line_bokeh_chart/i18n/it.po new file mode 100644 index 0000000000..4f1410debc --- /dev/null +++ b/project_forecast_line_bokeh_chart/i18n/it.po @@ -0,0 +1,142 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_forecast_line_bokeh_chart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-04-11 15:22+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Available" +msgstr "Disponibile" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__bokeh_chart +msgid "Bokeh Chart" +msgstr "Grafico Bokeh" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__date_from +msgid "Date From" +msgstr "Dalla data" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__day +msgid "Day" +msgstr "Giorno" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__employee_ids +msgid "Employee" +msgstr "Dipendente" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting +#: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.view_forecast_line_reporting +msgid "Forecast Reporting" +msgstr "Resoconto previsionale" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model,name:project_forecast_line_bokeh_chart.model_forecast_line_reporting +msgid "Forecast reporting wizard" +msgstr "Procedura guidata resoconto previsionale" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__granularity +msgid "Granularity" +msgstr "Granularità" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__id +msgid "ID" +msgstr "ID" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__month +msgid "Month" +msgstr "Mese" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__nb_months +msgid "Nb Months" +msgstr "Nr. mesi" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Not assigned to an employee" +msgstr "Non assegnato a un dipendente" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Nothing to plot. Select some employees" +msgstr "Niente da disegnare. Selezionare qualche dipendente" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Overload" +msgstr "Sovraccarico" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "Project" +msgstr "Progetto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,help:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "" +"Setting this will automatically add all employees assigned to tasks on the " +"project" +msgstr "" +"Questa impostazione aggiungerà automaticamente tutti i dipendenti assegnati " +"alle attività al progetto" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__week +msgid "Week" +msgstr "Settimana" diff --git a/project_forecast_line_bokeh_chart/i18n/project_forecast_line_bokeh_chart.pot b/project_forecast_line_bokeh_chart/i18n/project_forecast_line_bokeh_chart.pot new file mode 100644 index 0000000000..4fbcd3c7d2 --- /dev/null +++ b/project_forecast_line_bokeh_chart/i18n/project_forecast_line_bokeh_chart.pot @@ -0,0 +1,142 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_forecast_line_bokeh_chart +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.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: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Available" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__bokeh_chart +msgid "Bokeh Chart" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_uid +msgid "Created by" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__create_date +msgid "Created on" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__date_from +msgid "Date From" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__day +msgid "Day" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__display_name +msgid "Display Name" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__employee_ids +msgid "Employee" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.actions.act_window,name:project_forecast_line_bokeh_chart.action_forecast_lines_reporting +#: model:ir.ui.menu,name:project_forecast_line_bokeh_chart.menu_forecast_line_reporting +#: model_terms:ir.ui.view,arch_db:project_forecast_line_bokeh_chart.view_forecast_line_reporting +msgid "Forecast Reporting" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model,name:project_forecast_line_bokeh_chart.model_forecast_line_reporting +msgid "Forecast reporting wizard" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__granularity +msgid "Granularity" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__id +msgid "ID" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting____last_update +msgid "Last Modified on" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__write_date +msgid "Last Updated on" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__month +msgid "Month" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__nb_months +msgid "Nb Months" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Not assigned to an employee" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Nothing to plot. Select some employees" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#: code:addons/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py:0 +#, python-format +msgid "Overload" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,field_description:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "Project" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields,help:project_forecast_line_bokeh_chart.field_forecast_line_reporting__project_ids +msgid "" +"Setting this will automatically add all employees assigned to tasks on the " +"project" +msgstr "" + +#. module: project_forecast_line_bokeh_chart +#: model:ir.model.fields.selection,name:project_forecast_line_bokeh_chart.selection__forecast_line_reporting__granularity__week +msgid "Week" +msgstr "" diff --git a/project_forecast_line_bokeh_chart/readme/CONTRIBUTORS.rst b/project_forecast_line_bokeh_chart/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..8785f72c06 --- /dev/null +++ b/project_forecast_line_bokeh_chart/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Alexandre Fayolle diff --git a/project_forecast_line_bokeh_chart/readme/DESCRIPTION.rst b/project_forecast_line_bokeh_chart/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..a6a54ca06a --- /dev/null +++ b/project_forecast_line_bokeh_chart/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module improves the reports of project_forecast_line by using the bokeh widget available in OCA/web. diff --git a/project_forecast_line_bokeh_chart/report/__init__.py b/project_forecast_line_bokeh_chart/report/__init__.py new file mode 100644 index 0000000000..e8dbc4d1d1 --- /dev/null +++ b/project_forecast_line_bokeh_chart/report/__init__.py @@ -0,0 +1 @@ +from . import forecast_line_reporting diff --git a/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py b/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py new file mode 100644 index 0000000000..93cc3bfd56 --- /dev/null +++ b/project_forecast_line_bokeh_chart/report/forecast_line_reporting.py @@ -0,0 +1,222 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +import json + +# pylint: disable=W7936 +from bokeh import palettes +from bokeh.embed import components +from bokeh.layouts import column +from bokeh.models import ColumnDataSource, FactorRange +from bokeh.plotting import figure +from dateutil.relativedelta import relativedelta + +from odoo import _, api, fields, models +from odoo.tools import date_utils + + +class ForecastLineReporting(models.TransientModel): + _name = "forecast.line.reporting" + _description = "Forecast reporting wizard" + + bokeh_chart = fields.Text(compute="_compute_bokeh_chart") + date_from = fields.Date(default=fields.Date.today) + nb_months = fields.Integer(default=2) + granularity = fields.Selection( + [("day", "Day"), ("week", "Week"), ("month", "Month")], + default=lambda r: r.env.company.forecast_line_granularity, + required=True, + ) + + employee_ids = fields.Many2many("hr.employee") + + project_ids = fields.Many2many( + "project.project", + help="Setting this will automatically add " + "all employees assigned to tasks on the project", + ) + + @api.onchange("project_ids") + def onchange_project_ids(self): + if self.project_ids: + self.employee_ids |= self.project_ids.mapped( + "task_ids.user_ids.employee_ids" + ) + + @api.depends("date_from", "nb_months", "employee_ids", "granularity", "project_ids") + def _compute_bokeh_chart(self): + """compute the chart to be displayed""" + # the current implementation shows 1 chart per selected employee over + # the next nb_month months with the selected granularity. For each + # employee, the chart displays the consolidated_forecast field + # grouped by project on which the employee is planned for a given + # period. + plots = self._build_plots() + grid = column(*plots) + script, div = components(grid, wrap_script=False) + self.bokeh_chart = json.dumps({"div": div, "script": script}) + + def _prepare_bokeh_chart_data(self): + """compute the data that will be plotted. + + :return: a tuple with 2 elements: (projects list, plot_data + dictionary). + + The plot data dictionary is nested dictionary defined as follows: + + { + employee: { + project: { + date: forecast + for dates with a forecast on that project + } + for all projects scheduled on employee + } + for all selected employees + } + + """ + end_date = self.date_from + relativedelta(months=self.nb_months) + domain = [ + ("date_from", ">=", self.date_from), + ("date_to", "<=", end_date), + ] + if self.employee_ids: + if self.project_ids: + domain += [ + "|", + "&", + ("employee_id", "=", False), + ("project_id", "in", self.project_ids.ids), + ("employee_id", "in", self.employee_ids.ids), + ] + else: + domain += [("employee_id", "in", self.employee_ids.ids)] + else: + domain.append(("employee_id", "=", False)) + groups = [ + "date_from:%s" % self.granularity, + "employee_id", + "project_id", + ] + groupdata = self.env["forecast.line"].read_group( + domain, ["consolidated_forecast"], groups, lazy=False + ) + employees = set() + projects = set() + data_project = {} + data_overload = {} + for d in groupdata: + employee = d.get("employee_id") + if employee: + employee = employee[1]._value + else: + employee = _("Not assigned to an employee") + employees.add(employee) + if employee not in data_project: + data_project[employee] = {} + data_overload[employee] = {} + forecast = d["consolidated_forecast"] + date = d["__range"]["date_from:%s" % self.granularity]["from"] + project = d.get("project_id") + if project: + project = project[1]._value + data = data_project + elif forecast >= 0: + project = _("Available") + data = data_project + else: + project = _("Overload") + data = data_overload + projects.add(project) + if project not in data[employee]: + data[employee][project] = {} + x_key = date + data[employee][project][x_key] = forecast + employees = list(employees) + employees.sort() + if _("Not assigned to an employee") in employees: + # make sure it is the last one + employees.remove(_("Not assigned to an employee")) + employees.append(_("Not assigned to an employee")) + projects = list(projects) + projects.sort() + for name in [_("Available"), _("Overload")]: + if name in projects: + # make sure these two get in the first tow positions + projects.remove(name) + projects.insert(0, name) + return employees, projects, data_project, data_overload + + def _get_time_range(self): + end_date = self.date_from + relativedelta(months=self.nb_months) + dates = [] + granularity = self.granularity + date = self.date_from + delta = date_utils.get_timedelta(1, granularity) + while date < end_date: + dates.append(date.strftime("%Y-%m-%d")) + date += delta + return dates + + def _build_empty_plot(self, height=300, width=1024): + dates = self._get_time_range() + p = figure(height=height, width=width, x_range=FactorRange(*dates)) + p.title.text = _("Nothing to plot. Select some employees") + return [p] + + def _get_palette(self, projects): + """return a dictionary mapping project names to colors""" + if len(projects) <= 20: + project_colors = palettes.Category20[max(len(projects), 3)][: len(projects)] + else: + step = len(palettes.Turbo256) // len(projects) + project_colors = palettes.Turbo256[::step][: len(projects)] + return dict(zip(projects, project_colors)) + + def _build_plots(self, height=300, width=1024): + employees, projects, data, data_overload = self._prepare_bokeh_chart_data() + if not data: + return self._build_empty_plot(height, width) + project_color_map = self._get_palette(projects) + dates = self._get_time_range() + plots = [] + for employee in employees: + plot_data = {"dates": dates} + plot_data_overload = {"dates": dates} + for project in data[employee]: + forecast = data[employee][project] + plot_data[project] = [forecast.get(date, 0) for date in dates] + for project in data_overload[employee]: + forecast = data_overload[employee][project] + plot_data_overload[project] = [forecast.get(date, 0) for date in dates] + plot_projects = [ + p + for p in projects + if p in data[employee] or p in data_overload[employee] + ] + source = ColumnDataSource(data=plot_data) + source_overload = ColumnDataSource(data=plot_data_overload) + p = figure( + x_range=FactorRange(*dates), + height=max(height, len(plot_projects) * 30), + width=width, + ) + for src in (source, source_overload): + p.vbar_stack( + plot_projects, + x="dates", + source=src, + width=0.4, + alpha=0.5, + color=[project_color_map[p] for p in plot_projects], + legend_label=[ + (proj_name if len(proj_name) < 20 else proj_name[:19] + "…") + for proj_name in plot_projects + ], + ) + p.xaxis.major_label_orientation = "vertical" + p.title.text = employee + p.legend.click_policy = "mute" + p.add_layout(p.legend[0], "right") + plots.append(p) + return plots diff --git a/project_forecast_line_bokeh_chart/report/forecast_line_reporting_views.xml b/project_forecast_line_bokeh_chart/report/forecast_line_reporting_views.xml new file mode 100644 index 0000000000..53647c89ee --- /dev/null +++ b/project_forecast_line_bokeh_chart/report/forecast_line_reporting_views.xml @@ -0,0 +1,41 @@ + + + + forecast.line.reporting + +
+ +

Forecast Reporting

+ + + + + + + + + + + + + +
+
+
+
+ + Forecast Reporting + ir.actions.act_window + forecast.line.reporting + form + + + + +
diff --git a/project_forecast_line_bokeh_chart/security/ir.model.access.csv b/project_forecast_line_bokeh_chart/security/ir.model.access.csv new file mode 100644 index 0000000000..e27c0edcc1 --- /dev/null +++ b/project_forecast_line_bokeh_chart/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +project_forecast_line_bokeh_chart.access_forecast_line_reporting,access_forecast_line_reporting,project_forecast_line_bokeh_chart.model_forecast_line_reporting,base.group_user,1,1,1,1 diff --git a/project_forecast_line_bokeh_chart/static/description/icon.png b/project_forecast_line_bokeh_chart/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/project_forecast_line_bokeh_chart/static/description/icon.png differ diff --git a/project_forecast_line_bokeh_chart/static/description/index.html b/project_forecast_line_bokeh_chart/static/description/index.html new file mode 100644 index 0000000000..a6e7ef2f85 --- /dev/null +++ b/project_forecast_line_bokeh_chart/static/description/index.html @@ -0,0 +1,427 @@ + + + + + + +Project Forecast Lines Bokeh Chart + + + +
+

Project Forecast Lines Bokeh Chart

+ + +

Alpha License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

+

This module improves the reports of project_forecast_line by using the bokeh widget available in OCA/web.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

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 +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp SA
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/project project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/project_milestone_tree/README.rst b/project_milestone_tree/README.rst new file mode 100644 index 0000000000..663d53efb6 --- /dev/null +++ b/project_milestone_tree/README.rst @@ -0,0 +1,66 @@ +============================ +Project Milestones Tree View +============================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c0dadc5ea6d569e710ffdf2943096d81c8b42f9c419a010ad68e34e5b60aa9af + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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 + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github + :target: https://github.com/OCA/project/tree/16.0/project_milestone_tree + :alt: OCA/project +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_milestone_tree + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds an access to the Milestone tree view. + +**Table of contents** + +.. contents:: + :local: + +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 +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/project `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/project_milestone_tree/__init__.py b/project_milestone_tree/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/project_milestone_tree/__manifest__.py b/project_milestone_tree/__manifest__.py new file mode 100644 index 0000000000..d9012b5e61 --- /dev/null +++ b/project_milestone_tree/__manifest__.py @@ -0,0 +1,16 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Project Milestones Tree View", + "summary": "This module adds an access to the Milestone tree view.", + "author": "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/project", + "category": "Project Management", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "depends": ["project"], + "data": [ + "views/project_milestone.xml", + ], + "application": False, +} diff --git a/project_milestone_tree/i18n/it.po b/project_milestone_tree/i18n/it.po new file mode 100644 index 0000000000..4ecd297f29 --- /dev/null +++ b/project_milestone_tree/i18n/it.po @@ -0,0 +1,23 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_milestone_tree +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-05-12 12:36+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: project_milestone_tree +#: model:ir.actions.act_window,name:project_milestone_tree.project_milestone_tree_action +#: model:ir.ui.menu,name:project_milestone_tree.project_menu_config_milestone +msgid "Milestones" +msgstr "Milestone" diff --git a/project_milestone_tree/i18n/project_milestone_tree.pot b/project_milestone_tree/i18n/project_milestone_tree.pot new file mode 100644 index 0000000000..cc654f5245 --- /dev/null +++ b/project_milestone_tree/i18n/project_milestone_tree.pot @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_milestone_tree +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: project_milestone_tree +#: model:ir.actions.act_window,name:project_milestone_tree.project_milestone_tree_action +#: model:ir.ui.menu,name:project_milestone_tree.project_menu_config_milestone +msgid "Milestones" +msgstr "" diff --git a/project_milestone_tree/readme/DESCRIPTION.rst b/project_milestone_tree/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..9b35fd56d3 --- /dev/null +++ b/project_milestone_tree/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds an access to the Milestone tree view. diff --git a/project_milestone_tree/static/description/icon.png b/project_milestone_tree/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/project_milestone_tree/static/description/icon.png differ diff --git a/project_milestone_tree/static/description/index.html b/project_milestone_tree/static/description/index.html new file mode 100644 index 0000000000..08fc9d3953 --- /dev/null +++ b/project_milestone_tree/static/description/index.html @@ -0,0 +1,407 @@ + + + + + + +Project Milestones Tree View + + + +
+

Project Milestones Tree View

+ + +

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

+

This module adds an access to the Milestone tree view.

+

Table of contents

+ +
+

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 +feedback.

+

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

+
+
+

Credits

+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/project project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/project_milestone_tree/views/project_milestone.xml b/project_milestone_tree/views/project_milestone.xml new file mode 100644 index 0000000000..eb6dd8a0fd --- /dev/null +++ b/project_milestone_tree/views/project_milestone.xml @@ -0,0 +1,12 @@ + + + Milestones + project.milestone + tree,form + + + diff --git a/project_parent_task_filter/README.rst b/project_parent_task_filter/README.rst index 3b233fb8df..dec6b164ba 100644 --- a/project_parent_task_filter/README.rst +++ b/project_parent_task_filter/README.rst @@ -7,7 +7,7 @@ Project Parent Task Filter !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b24efc6f589e2166a61259650a4d0914a030a0697cc4cec5a088847fb5dfc802 + !! source digest: sha256:c49a04029b165ad313ff4bf31ef33f3f88c4b0a03ef390c15ce1ba7b05feb6da !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/project_parent_task_filter/__manifest__.py b/project_parent_task_filter/__manifest__.py index 118c613f34..caa42ec78a 100644 --- a/project_parent_task_filter/__manifest__.py +++ b/project_parent_task_filter/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Project Parent Task Filter", "summary": "Add a filter to show the parent tasks", - "version": "16.0.1.0.0", + "version": "16.0.1.1.0", "category": "Project", "website": "https://github.com/OCA/project", "author": "C2i Change 2 improve, " "Odoo Community Association (OCA)", diff --git a/project_parent_task_filter/static/description/index.html b/project_parent_task_filter/static/description/index.html index eba95810b7..b8122ad8c2 100644 --- a/project_parent_task_filter/static/description/index.html +++ b/project_parent_task_filter/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,7 +366,7 @@

Project Parent Task Filter

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b24efc6f589e2166a61259650a4d0914a030a0697cc4cec5a088847fb5dfc802 +!! source digest: sha256:c49a04029b165ad313ff4bf31ef33f3f88c4b0a03ef390c15ce1ba7b05feb6da !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

This module adds a filter to show only the parent tasks in a project and diff --git a/project_parent_task_filter/views/project_task.xml b/project_parent_task_filter/views/project_task.xml index 5634541a5c..4fd53cdef0 100644 --- a/project_parent_task_filter/views/project_task.xml +++ b/project_parent_task_filter/views/project_task.xml @@ -24,16 +24,6 @@ - - project.task.tree.substask - project.task - - - - 0 - - - project.task.kanban project.task diff --git a/project_role/README.rst b/project_role/README.rst index 179dff26cb..ca6db74998 100644 --- a/project_role/README.rst +++ b/project_role/README.rst @@ -7,7 +7,7 @@ Project Roles !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:a574d3ac25f967aa72848d5494169f0ff724824470edcca196eb7ef800cd2760 + !! source digest: sha256:3548d16022364d2ad035fe913cefd2b7bce880df8142804cb8c0861922fb646e !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/project_role/__manifest__.py b/project_role/__manifest__.py index b1002b0bf3..df74c42d6f 100644 --- a/project_role/__manifest__.py +++ b/project_role/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Project Roles", - "version": "16.0.1.0.3", + "version": "16.0.1.0.4", "category": "Project", "website": "https://github.com/OCA/project", "author": "CorporateHub, Odoo Community Association (OCA)", diff --git a/project_role/models/project_project.py b/project_role/models/project_project.py index 0fb4510ba2..c611e7fa13 100644 --- a/project_role/models/project_project.py +++ b/project_role/models/project_project.py @@ -23,14 +23,14 @@ class ProjectProject(models.Model): @api.model def _default_inherit_assignments(self): company = self.env["res.company"].browse( - self._context.get("company_id", self.env.user.company_id.id) + self._context.get("company_id", self.env.company.id) ) return company.project_inherit_assignments @api.model def _default_limit_role_to_assignments(self): company = self.env["res.company"].browse( - self._context.get("company_id", self.env.user.company_id.id) + self._context.get("company_id", self.env.company.id) ) return company.project_limit_role_to_assignments diff --git a/project_role/static/description/index.html b/project_role/static/description/index.html index 86f3ca2b02..9e9b6a729e 100644 --- a/project_role/static/description/index.html +++ b/project_role/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,7 +366,7 @@

Project Roles

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:a574d3ac25f967aa72848d5494169f0ff724824470edcca196eb7ef800cd2760 +!! source digest: sha256:3548d16022364d2ad035fe913cefd2b7bce880df8142804cb8c0861922fb646e !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

This module allows maintaining project roster based on roles and assignments. diff --git a/project_role/tests/test_project_role.py b/project_role/tests/test_project_role.py index cbab08f381..e3eb7f8899 100644 --- a/project_role/tests/test_project_role.py +++ b/project_role/tests/test_project_role.py @@ -22,7 +22,7 @@ def setUp(self): self.Project = self.env["project.project"] self.Role = self.env["project.role"] self.Assignment = self.env["project.assignment"] - self.company_id = self.env.user.company_id + self.company_id = self.env.company def test_create_assignment(self): user = self.ResUsers.sudo().create( diff --git a/project_stock/README.rst b/project_stock/README.rst index 7ee2610d46..9ec6b64033 100644 --- a/project_stock/README.rst +++ b/project_stock/README.rst @@ -7,7 +7,7 @@ Project Stock !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:54fd250bfc9536f4dc48c744f126d98295f5d798ad57d7c9e8b25039a0e913ba + !! source digest: sha256:ad512688e6eb234d7f33624a3edb9af58f1ac8d0f177bc5608aa530daf671f0b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/project_stock/__manifest__.py b/project_stock/__manifest__.py index c93b46fd90..4d0697cce9 100644 --- a/project_stock/__manifest__.py +++ b/project_stock/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Project Stock", - "version": "16.0.1.0.2", + "version": "16.0.1.2.0", "category": "Project Management", "website": "https://github.com/OCA/project", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/project_stock/i18n/es.po b/project_stock/i18n/es.po index 716b7717ca..b9ee75afa3 100644 --- a/project_stock/i18n/es.po +++ b/project_stock/i18n/es.po @@ -130,6 +130,11 @@ msgstr "Hecho" msgid "Done Stock Moves" msgstr "Realizar movimientos hechos" +#. module: project_stock +#: model_terms:ir.ui.view,arch_db:project_stock.view_stock_move_raw_tree +msgid "Forecasted Report" +msgstr "" + #. module: project_stock #: model:ir.model.fields,field_description:project_stock.field_project_task__group_id msgid "Group" diff --git a/project_stock/i18n/fr.po b/project_stock/i18n/fr.po index ea61a00588..0fd1e53466 100644 --- a/project_stock/i18n/fr.po +++ b/project_stock/i18n/fr.po @@ -127,6 +127,11 @@ msgstr "" msgid "Done Stock Moves" msgstr "" +#. module: project_stock +#: model_terms:ir.ui.view,arch_db:project_stock.view_stock_move_raw_tree +msgid "Forecasted Report" +msgstr "" + #. module: project_stock #: model:ir.model.fields,field_description:project_stock.field_project_task__group_id msgid "Group" diff --git a/project_stock/i18n/hr.po b/project_stock/i18n/hr.po index bcf0126651..07c3af70d2 100644 --- a/project_stock/i18n/hr.po +++ b/project_stock/i18n/hr.po @@ -130,6 +130,11 @@ msgstr "Završeno" msgid "Done Stock Moves" msgstr "Završena skladišna kretanja" +#. module: project_stock +#: model_terms:ir.ui.view,arch_db:project_stock.view_stock_move_raw_tree +msgid "Forecasted Report" +msgstr "" + #. module: project_stock #: model:ir.model.fields,field_description:project_stock.field_project_task__group_id msgid "Group" diff --git a/project_stock/i18n/it.po b/project_stock/i18n/it.po index 76c8316a64..7c9ede427a 100644 --- a/project_stock/i18n/it.po +++ b/project_stock/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-12-18 10:34+0000\n" +"PO-Revision-Date: 2024-06-14 17:43+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -129,6 +129,11 @@ msgstr "Eseguito" msgid "Done Stock Moves" msgstr "Movimenti di magazzino eseguiti" +#. module: project_stock +#: model_terms:ir.ui.view,arch_db:project_stock.view_stock_move_raw_tree +msgid "Forecasted Report" +msgstr "Resoconto previsto" + #. module: project_stock #: model:ir.model.fields,field_description:project_stock.field_project_task__group_id msgid "Group" diff --git a/project_stock/i18n/project_stock.pot b/project_stock/i18n/project_stock.pot index e3c847627e..454c2e883b 100644 --- a/project_stock/i18n/project_stock.pot +++ b/project_stock/i18n/project_stock.pot @@ -126,6 +126,11 @@ msgstr "" msgid "Done Stock Moves" msgstr "" +#. module: project_stock +#: model_terms:ir.ui.view,arch_db:project_stock.view_stock_move_raw_tree +msgid "Forecasted Report" +msgstr "" + #. module: project_stock #: model:ir.model.fields,field_description:project_stock.field_project_task__group_id msgid "Group" diff --git a/project_stock/i18n/pt_BR.po b/project_stock/i18n/pt_BR.po index 22ee534925..76884b545b 100644 --- a/project_stock/i18n/pt_BR.po +++ b/project_stock/i18n/pt_BR.po @@ -6,8 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-10-28 09:51+0000\n" -"Last-Translator: Adriano Prado \n" +"PO-Revision-Date: 2024-06-11 15:35+0000\n" +"Last-Translator: Rodrigo Macedo \n" "Language-Team: none\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" @@ -129,6 +130,11 @@ msgstr "Feito" msgid "Done Stock Moves" msgstr "Movimentos de Estoque Feitos" +#. module: project_stock +#: model_terms:ir.ui.view,arch_db:project_stock.view_stock_move_raw_tree +msgid "Forecasted Report" +msgstr "Relatório Previsto" + #. module: project_stock #: model:ir.model.fields,field_description:project_stock.field_project_task__group_id msgid "Group" diff --git a/project_stock/models/stock_move.py b/project_stock/models/stock_move.py index 3394664f3e..22657db3ac 100644 --- a/project_stock/models/stock_move.py +++ b/project_stock/models/stock_move.py @@ -99,6 +99,19 @@ def default_get(self, fields_list): ) return defaults + def action_task_product_forecast_report(self): + self.ensure_one() + action = self.product_id.action_product_forecast_report() + action["context"] = { + "active_id": self.product_id.id, + "active_model": "product.product", + "move_to_match_ids": self.ids, + } + warehouse = self.warehouse_id + if warehouse: + action["context"]["warehouse"] = warehouse.id + return action + class StockMoveLine(models.Model): _inherit = "stock.move.line" diff --git a/project_stock/static/description/index.html b/project_stock/static/description/index.html index a9dbe8acf1..ab2750d7b3 100644 --- a/project_stock/static/description/index.html +++ b/project_stock/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,7 +366,7 @@

Project Stock

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:54fd250bfc9536f4dc48c744f126d98295f5d798ad57d7c9e8b25039a0e913ba +!! source digest: sha256:ad512688e6eb234d7f33624a3edb9af58f1ac8d0f177bc5608aa530daf671f0b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

This module allows to consume products directly from a project task.

diff --git a/project_stock/tests/common.py b/project_stock/tests/common.py index eb7f9cb084..1eb846ff65 100644 --- a/project_stock/tests/common.py +++ b/project_stock/tests/common.py @@ -47,7 +47,7 @@ def setUpClass(cls): cls.stage_in_progress = cls.env.ref("project.project_stage_1") cls.stage_done = cls.env.ref("project.project_stage_2") group_stock_user = "stock.group_stock_user" - new_test_user( + cls.basic_user = new_test_user( cls.env, login="basic-user", groups="project.group_project_user,%s" % group_stock_user, diff --git a/project_stock/tests/test_project_stock.py b/project_stock/tests/test_project_stock.py index 53278fc331..3428d562d1 100644 --- a/project_stock/tests/test_project_stock.py +++ b/project_stock/tests/test_project_stock.py @@ -1,8 +1,9 @@ -# Copyright 2022-2023 Tecnativa - Víctor Martínez +# Copyright 2022-2024 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields from odoo.tests import Form from odoo.tests.common import users +from odoo.tools import mute_logger from .common import TestProjectStockBase @@ -81,6 +82,15 @@ def test_project_task_without_analytic_account(self): def test_project_task_without_analytic_account_manager_user(self): self.test_project_task_without_analytic_account() + def test_project_task_user_access_without_stock_group(self): + self.basic_user.write( + { + "groups_id": [(6, 0, [self.env.ref("project.group_project_user").id])], + } + ) + task_form = Form(self.task.with_user(self.basic_user)) + self.assertEqual(task_form.project_id, self.project) + def test_project_task_analytic_lines_without_tags(self): self.task = self.env["project.task"].browse(self.task.id) self.task.write({"stage_id": self.stage_done.id}) @@ -173,6 +183,7 @@ def test_project_task_process_done(self): def test_project_task_process_done_basic_user(self): self.test_project_task_process_done() + @mute_logger("odoo.models.unlink") def test_project_task_process_cancel(self): self.task = self.env["project.task"].browse(self.task.id) self.assertEqual(self.move_product_a.state, "draft") @@ -212,6 +223,7 @@ def test_project_task_process_cancel(self): def test_project_task_process_cancel_manager_user(self): self.test_project_task_process_cancel() + @mute_logger("odoo.models.unlink") def test_project_task_process_unreserve(self): self.task = self.env["project.task"].browse(self.task.id) self.assertEqual(self.move_product_a.state, "draft") @@ -233,6 +245,7 @@ def test_project_task_process_unreserve(self): self.assertEqual(self.move_product_b.reserved_availability, 0) self.assertFalse(self.task.unreserve_visible) + @mute_logger("odoo.models.unlink") def test_project_task_process_01(self): """Product A move cancel + Product B move OK.""" self.task = self.env["project.task"].browse(self.task.id) @@ -290,6 +303,7 @@ def test_project_task_action_done(self): def test_project_task_action_done_basic_user(self): self.test_project_task_action_done() + @mute_logger("odoo.models.unlink") def test_project_task_unlink(self): self.assertTrue(self.env["project.task"].browse(self.task.id).unlink()) @@ -297,6 +311,7 @@ def test_project_task_unlink(self): def test_project_task_unlink_basic_user(self): self.test_project_task_unlink() + @mute_logger("odoo.models.unlink") def test_project_project_onchange(self): new_type = self.env.ref("stock.picking_type_out") self.project.write({"picking_type_id": new_type.id}) diff --git a/project_stock/views/project_task_view.xml b/project_stock/views/project_task_view.xml index f5be5b1b36..0f5395c3e2 100644 --- a/project_stock/views/project_task_view.xml +++ b/project_stock/views/project_task_view.xml @@ -40,13 +40,14 @@ /> - +