diff --git a/.circleci/config.yml b/.circleci/config.yml index af4eb513..6478a0dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,19 +31,6 @@ jobs: - store_test_results: path: .log - testcafe: - machine: true - steps: - - checkout - - - run: - name: Build -- Init Database - command: docker-compose run --rm odoo odoo --stop-after-init -i main - -# - run: -# name: Run Tests With Chrome -# command: docker-compose run --rm testcafe 'chrome:headless --no-sandbox' /tests/*.js --skip-js-errors --speed 0.5 - # job that find the next tag for the current branch/repo and push the tag to github. # it will trigger the publish of a new docker image. auto-tag: @@ -68,9 +55,6 @@ workflows: jobs: - tests: context: quay.io - - - testcafe - - auto-tag: context: nws requires: diff --git a/.docker_files/main/__manifest__.py b/.docker_files/main/__manifest__.py index c1574227..1e0b6f7d 100644 --- a/.docker_files/main/__manifest__.py +++ b/.docker_files/main/__manifest__.py @@ -22,53 +22,33 @@ "project_cost_smart_button", "project_default_task_stage", "project_enhanced", - # "project_estimation", - # "project_estimation_material", "project_form_with_dates", "project_group_create", "project_hide_create_sale_order", "project_iteration", "project_iteration_parent_only", "project_iteration_parent_type_required", - # "project_iteration_sale_inheritance", - # "project_kanban_dates", - # "project_kanban_to_form", "project_lump_sum", "project_material", "project_material_direct", - # "project_material_progress", - # "project_material_quantity_filters", - # "project_milestone_dependency", "project_milestone_enhanced", "project_milestone_estimated_hours", - # "project_milestone_remaining_hours", "project_milestone_spent_hours", - # "project_milestone_start_date", "project_milestone_time_report", - # "project_milestone_type", "project_milestone_time_kpi", - # "project_milestone_timeline", - # "project_milestone_timeline_color", - # "project_milestone_week_duration", "project_no_quick_create", "project_outsourcing", "project_outsourcing_timesheet_automation", - # "project_portal_hide_timesheets", - # "project_portal_no_subtask", "project_portal_parent_task", "project_remaining_hours_update", - # "project_role_milestone", "project_stage", "project_stage_allow_timesheet", "project_stage_no_quick_create", "project_task_analytic_lines", - # "project_task_analytic_lines_stock", - # "project_task_customer_reference", "project_task_date_planned", "project_task_deadline_from_project", "project_task_dependency_more_info", "project_task_description_template", - # "project_task_editable_list_stage", "project_task_editable_list_view", "project_task_full_text_search", "project_task_id_in_display_name", @@ -91,9 +71,6 @@ "stock_location_production", "project_wip", "project_wip_material", - # "project_wip_outsourcing", - # "project_wip_supply_cost", - # "project_wip_timesheet", "timesheet_task_project_no_change", ], "installable": True, diff --git a/.docker_files/odoo.conf b/.docker_files/odoo.conf index b50118f9..57441e2b 100644 --- a/.docker_files/odoo.conf +++ b/.docker_files/odoo.conf @@ -14,8 +14,8 @@ demo = {} email_from = False geoip_database = /usr/share/GeoIP/GeoLiteCity.dat import_partial = -limit_memory_hard = 2684354560 -limit_memory_soft = 2147483648 +limit_memory_hard = 4026531840 +limit_memory_soft = 3355443200 limit_request = 8192 limit_time_cpu = 1500 limit_time_real = 1500 diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..b6a254ef --- /dev/null +++ b/.flake8 @@ -0,0 +1,12 @@ +[flake8] +max-line-length = 88 +max-complexity = 16 +# B = bugbear +# B9 = bugbear opinionated (incl line length) +select = C,E,F,W,B,B9 +# E203: whitespace before ':' (black behaviour) +# E501: flake8 line length (covered by bugbear B950) +# W503: line break before binary operator (black behaviour) +ignore = E203,E501,W503,F821 +per-file-ignores= + __init__.py:F401 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..47590c75 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,36 @@ +name: pre-commit + +on: + pull_request: + branches: + - "14.0*" + push: + branches: + - "14.0" + +jobs: + pre-commit: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v2 + with: + python-version: "3.11" + - name: Get python version + run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV + - uses: actions/cache@v1 + with: + path: ~/.cache/pre-commit + key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} + - name: Install pre-commit + run: pip install pre-commit + - name: Run pre-commit + run: pre-commit run --all-files --show-diff-on-failure --color=always + - name: Check that all files generated by pre-commit are in git + run: | + newfiles="$(git ls-files --others --exclude-from=.gitignore)" + if [ "$newfiles" != "" ] ; then + echo "Please check-in the following files:" + echo "$newfiles" + exit 1 + fi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b3a281c..28b1b493 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,30 @@ +exclude: | + (?x) + # NOT INSTALLABLE ADDONS + # END NOT INSTALLABLE ADDONS + # Files and folders generated by bots, to avoid loops + ^setup/|/static/description/index\.html$| + # We don't want to mess with tool-generated files + .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/| + # Maybe reactivate this when all README files include prettier ignore tags? + ^README\.md$| + # Library files can have extraneous formatting (even minimized) + /static/(src/)?lib/| + # Repos using Sphinx to generate docs don't need prettying + ^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/| + # You don't usually want a bot to modify your legal texts + (LICENSE.*|COPYING.*) +default_language_version: + python: python3 + node: "14.13.0" repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + - repo: https://github.com/PyCQA/flake8 + rev: 3.8.3 hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace - - repo: https://github.com/psf/black - rev: 19.3b0 - hooks: - - id: black + - id: flake8 + name: flake8 + additional_dependencies: ["flake8-bugbear==20.1.4"] diff --git a/.testcafe/Dockerfile b/.testcafe/Dockerfile deleted file mode 100644 index 27b2bbae..00000000 --- a/.testcafe/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM node:17.9.0-bullseye -LABEL maintainer="contact@numigi.com" - -RUN npm install -g testcafe@1.19.0 - -RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list && \ - wget https://dl-ssl.google.com/linux/linux_signing_key.pub && \ - apt-key add linux_signing_key.pub && \ - apt-get update && \ - apt-get install -y google-chrome-stable - -COPY tests /tests - -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] diff --git a/.testcafe/entrypoint.sh b/.testcafe/entrypoint.sh deleted file mode 100644 index e56a13eb..00000000 --- a/.testcafe/entrypoint.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -e - -get_odoo_response_code(){ - echo $(curl -o /dev/null --silent --head --write-out '%{http_code}\n' odoo.localtest.me:8069/) -} - -odoo_is_ready=$(get_odoo_response_code) -remaining_attempts=30 - -until [ $odoo_is_ready = '200' ]; do - if [ $remaining_attempts = 0 ]; then - echo "Failed to launch testcafe. The Odoo server is unreachable." - exit 1 - fi - odoo_is_ready=$(get_odoo_response_code) - echo "$(date) - waiting for odoo to be ready - remaining attempts: $(( remaining_attempts-- ))" - sleep 1 -done - -exec testcafe "$@" diff --git a/.testcafe/tests/common.js b/.testcafe/tests/common.js deleted file mode 100644 index 95a4fa79..00000000 --- a/.testcafe/tests/common.js +++ /dev/null @@ -1,39 +0,0 @@ - -import { Selector } from "testcafe" - -function login(t, login, password){ - var loginInput = Selector("#login") - var passwordInput = Selector("#password") - return t - .typeText(loginInput, login) - .typeText(passwordInput, password) - .click("button[type='submit']") -} - -function openProjectApp(t){ - return t - .click(".o_menu_apps > li > a") - .click("a[data-menu-xmlid='project.menu_main_pm']") -} - -function openAllTaskKanban(t){ - return openProjectApp(t) - .click("a[data-menu-xmlid='project_task_editable_list_view.search_menu']") - .click("a[data-menu-xmlid='project.menu_project_management']") -} - -function openAnyKabanRecord(t){ - return t.click(".o_kanban_record") -} - -function clickEditButton(t){ - return t.click(".o_form_button_edit") -} - -export { - login, - openProjectApp, - openAllTaskKanban, - openAnyKabanRecord, - clickEditButton, -} diff --git a/.testcafe/tests/testProjectTemplate.js b/.testcafe/tests/testProjectTemplate.js deleted file mode 100644 index 5b5b9b6a..00000000 --- a/.testcafe/tests/testProjectTemplate.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Tests for the module project_template. - * - * This module contains a javascript file that allows to declare a task/project field - * as invisible if the record is a template. - */ - -import { Selector } from 'testcafe' -import { login, openAllTaskKanban, openAnyKabanRecord, clickEditButton } from './common' - -fixture `Test the project_template module` - .page `odoo.localtest.me:8069/web`; - -function openExtraInfoTab(t){ - var tab = Selector("a[role='tab']").withText("Extra Info") - return t.click(tab); -} - -function checkIsTemplate(t){ - return t.click(".o_field_boolean[name='is_template']"); -} - -/** - * This test opens the form view of any task and checks the is_template box. - * After the box is checked, the field user_id is expected to be invisible. - */ -test('If after is_template checked, field user_id is hidden', async (t) => { - await login(t, 'admin', 'admin') - await openAllTaskKanban(t) - await openAnyKabanRecord(t) - await clickEditButton(t) - await openExtraInfoTab(t) - - var invisibleUserField = Selector(".o_field_widget[name='user_id'].o_invisible_modifier"); - await t.expect(invisibleUserField.exists).notOk(); - - await checkIsTemplate(t) - - await t.expect(invisibleUserField.exists).ok(); -}); diff --git a/.unported/__init__.py b/.unported/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/.unported/portal_project_list_hours_spent/README.rst b/.unported/portal_project_list_hours_spent/README.rst deleted file mode 100644 index 155527de..00000000 --- a/.unported/portal_project_list_hours_spent/README.rst +++ /dev/null @@ -1,4 +0,0 @@ -Portal Project List Hours Spent -=============================== - -To delete diff --git a/.unported/portal_project_list_hours_spent/__init__.py b/.unported/portal_project_list_hours_spent/__init__.py deleted file mode 100644 index 933f1b4b..00000000 --- a/.unported/portal_project_list_hours_spent/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/portal_project_list_hours_spent/__manifest__.py b/.unported/portal_project_list_hours_spent/__manifest__.py deleted file mode 100644 index c68074de..00000000 --- a/.unported/portal_project_list_hours_spent/__manifest__.py +++ /dev/null @@ -1,15 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Portal Project List Hours Spent", - "version": "1.0.1", - "author": "Numigi", - "maintainer": "Numigi", - "license": "LGPL-3", - "category": "Project", - "summary": "Add column total spent hours in portal list projects.", - "depends": ["project_lump_sum"], - "data": [], - "installable": True, -} diff --git a/.unported/portal_project_list_hours_spent/static/description/icon.png b/.unported/portal_project_list_hours_spent/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/portal_project_list_hours_spent/static/description/icon.png and /dev/null differ diff --git a/.unported/portal_project_timesheet_conditional/README.rst b/.unported/portal_project_timesheet_conditional/README.rst deleted file mode 100644 index 3ada1b61..00000000 --- a/.unported/portal_project_timesheet_conditional/README.rst +++ /dev/null @@ -1,38 +0,0 @@ -Portal Project List Hours Spent -=============================== - -.. contents:: Table of Contents - -Overview --------- -Add column spent hours in portal projects and tasks lists conditionally. - -Description ------------ - -If a project has not a type or has a type with **Lump Sum** not checked, the module: -- Add column ``Total Spent Hours`` in portal list projects. -- Add column ``Spent hours`` in portal list tasks. - -If a project has type with **Lump Sum** checked, the module hide ``Timesheets`` from portal task form view. - -Usage ------ - -- Create 2 projects, the first one has a type with Lump Sum checked and the second project has type with Lump Sum unchecked. -- Create tasks in each project and fill timesheet lines in those tasks. -- In portal projects list the Total Spent Hours will display only for the project which has type with ``Lump Sum`` unchecked. - - .. image:: ./static/description/portal_project_total_spent_hours.png - -- In portal task list the Spent Hours will display only for the tasks of a project which has type with ``Lump Sum`` unchecked. - - .. image:: ./static/description/portal_tasks_spent_hours.png - -- In portal task form the Timesheets will be hidden from a task of a project which has type with ``Lump Sum`` checked. - - -Contributors ------------- - -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/portal_project_timesheet_conditional/__init__.py b/.unported/portal_project_timesheet_conditional/__init__.py deleted file mode 100644 index a6d22383..00000000 --- a/.unported/portal_project_timesheet_conditional/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/portal_project_timesheet_conditional/__manifest__.py b/.unported/portal_project_timesheet_conditional/__manifest__.py deleted file mode 100644 index b78359db..00000000 --- a/.unported/portal_project_timesheet_conditional/__manifest__.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2021 today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Portal Project Timesheet Conditional", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "license": "LGPL-3", - "category": "Project", - "summary": "Add column total spent hours in portal " - "projects and tasks lists conditionally.", - "depends": ["project_lump_sum"], - "data": [ - "views/portal.xml", - ], - "installable": True, -} diff --git a/.unported/portal_project_timesheet_conditional/i18n/fr.po b/.unported/portal_project_timesheet_conditional/i18n/fr.po deleted file mode 100644 index 5cb11aec..00000000 --- a/.unported/portal_project_timesheet_conditional/i18n/fr.po +++ /dev/null @@ -1,73 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * portal_project_timesheet_conditional -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-07-14 09:40+0000\n" -"PO-Revision-Date: 2022-07-14 09:40+0000\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: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_task -msgid "Date" -msgstr "Date " - -#. module: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_task -msgid "Description" -msgstr "Description" - -#. module: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_task -msgid "Duration" -msgstr "Durée" - -#. module: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_projects_spent_hours -msgid "Number of Tasks" -msgstr "Numéro de tâches" - -#. module: portal_project_timesheet_conditional -#: model:ir.model,name:portal_project_timesheet_conditional.model_project_project -msgid "Project" -msgstr "Projet" - -#. module: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_projects_spent_hours -msgid "Project Name" -msgstr "Nom du projet" - -#. module: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_task -msgid "Responsible" -msgstr "Responsable" - -#. module: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_tasks -msgid "Spent Hours" -msgstr "Temps Passés" - -#. module: portal_project_timesheet_conditional -#: model:ir.model.fields,field_description:portal_project_timesheet_conditional.field_project_project__timesheet_ids -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_task -msgid "Timesheets" -msgstr "Feuilles de temps" - -#. module: portal_project_timesheet_conditional -#: model_terms:ir.ui.view,arch_db:portal_project_timesheet_conditional.portal_my_projects_spent_hours -msgid "Total Spent Hours" -msgstr "Total Temps Passés" - -#. module: portal_project_timesheet_conditional -#: model:ir.model.fields,field_description:portal_project_timesheet_conditional.field_project_project__total_hours_spent -msgid "Total spent hours" -msgstr "Total temps passés" - diff --git a/.unported/portal_project_timesheet_conditional/models/__init__.py b/.unported/portal_project_timesheet_conditional/models/__init__.py deleted file mode 100644 index 7136e43e..00000000 --- a/.unported/portal_project_timesheet_conditional/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project diff --git a/.unported/portal_project_timesheet_conditional/models/project.py b/.unported/portal_project_timesheet_conditional/models/project.py deleted file mode 100644 index d31d46e7..00000000 --- a/.unported/portal_project_timesheet_conditional/models/project.py +++ /dev/null @@ -1,24 +0,0 @@ -# © 2022 today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import fields, models, api - - -class Project(models.Model): - - _inherit = "project.project" - - timesheet_ids = fields.One2many("account.analytic.line", "project_id", - string="Timesheets") - total_hours_spent = fields.Float( - string="Total spent hours", - compute="_compute_total_hours_spent", store=True - ) - - @api.multi - @api.depends("timesheet_ids", "timesheet_ids.project_id", - "timesheet_ids.unit_amount") - def _compute_total_hours_spent(self): - for project in self: - project.total_hours_spent = \ - sum(project.timesheet_ids.mapped("unit_amount")) diff --git a/.unported/portal_project_timesheet_conditional/static/description/icon.png b/.unported/portal_project_timesheet_conditional/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/portal_project_timesheet_conditional/static/description/icon.png and /dev/null differ diff --git a/.unported/portal_project_timesheet_conditional/static/description/portal_project_total_spent_hours.png b/.unported/portal_project_timesheet_conditional/static/description/portal_project_total_spent_hours.png deleted file mode 100644 index 073ba0fe..00000000 Binary files a/.unported/portal_project_timesheet_conditional/static/description/portal_project_total_spent_hours.png and /dev/null differ diff --git a/.unported/portal_project_timesheet_conditional/static/description/portal_tasks_spent_hours.png b/.unported/portal_project_timesheet_conditional/static/description/portal_tasks_spent_hours.png deleted file mode 100644 index 2fba255e..00000000 Binary files a/.unported/portal_project_timesheet_conditional/static/description/portal_tasks_spent_hours.png and /dev/null differ diff --git a/.unported/portal_project_timesheet_conditional/views/portal.xml b/.unported/portal_project_timesheet_conditional/views/portal.xml deleted file mode 100644 index 0fd7b7a8..00000000 --- a/.unported/portal_project_timesheet_conditional/views/portal.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - diff --git a/.unported/project_cost_smart_button/README.rst b/.unported/project_cost_smart_button/README.rst deleted file mode 100644 index 7770ebe0..00000000 --- a/.unported/project_cost_smart_button/README.rst +++ /dev/null @@ -1,17 +0,0 @@ -Project Cost Smart Button -========================= -In vanilla Odoo, a smart button is available on analytic accounts to display the list of analytic lines. - -.. image:: static/description/analytic_account.png - -The module adds the same button on the form view of a project. - -.. image:: static/description/project.png - -When clicking on the button, the list of analytic lines related to the project is displayed. - -.. image:: static/description/analytic_lines.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_cost_smart_button/__init__.py b/.unported/project_cost_smart_button/__init__.py deleted file mode 100644 index 6ef2df91..00000000 --- a/.unported/project_cost_smart_button/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_cost_smart_button/__manifest__.py b/.unported/project_cost_smart_button/__manifest__.py deleted file mode 100644 index 09380d96..00000000 --- a/.unported/project_cost_smart_button/__manifest__.py +++ /dev/null @@ -1,20 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Cost Smart Button', - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'summary': 'Add a button to view the costs and revenues of a project', - 'depends': [ - 'project', - ], - 'data': [ - 'project.xml', - ], - 'installable': True, -} diff --git a/.unported/project_cost_smart_button/i18n/fr.po b/.unported/project_cost_smart_button/i18n/fr.po deleted file mode 100644 index 35662528..00000000 --- a/.unported/project_cost_smart_button/i18n/fr.po +++ /dev/null @@ -1,26 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_cost_smart_button -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-10 15:34+0000\n" -"PO-Revision-Date: 2019-04-10 15:34+0000\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_cost_smart_button -#: model:ir.ui.view,arch_db:project_cost_smart_button.project_form_with_cost_smart_button -msgid "Cost/Revenue" -msgstr "Coût/Revenu" - -#. module: project_cost_smart_button -#: model:ir.actions.act_window,name:project_cost_smart_button.analytic_lines_from_project_action -msgid "Costs & Revenues" -msgstr "Coûts & revenus" diff --git a/.unported/project_cost_smart_button/project.xml b/.unported/project_cost_smart_button/project.xml deleted file mode 100644 index 5afe7db0..00000000 --- a/.unported/project_cost_smart_button/project.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Costs & Revenues - account.analytic.line - form - tree,form,graph,pivot - - [('account_id.project_ids','=', active_id)] - - - - Project Form: add Cost/Revenue Smart button - project.project - - - - - - - diff --git a/.unported/project_cost_smart_button/static/description/analytic_account.png b/.unported/project_cost_smart_button/static/description/analytic_account.png deleted file mode 100644 index 405126b8..00000000 Binary files a/.unported/project_cost_smart_button/static/description/analytic_account.png and /dev/null differ diff --git a/.unported/project_cost_smart_button/static/description/analytic_lines.png b/.unported/project_cost_smart_button/static/description/analytic_lines.png deleted file mode 100644 index 9e00d877..00000000 Binary files a/.unported/project_cost_smart_button/static/description/analytic_lines.png and /dev/null differ diff --git a/.unported/project_cost_smart_button/static/description/icon.png b/.unported/project_cost_smart_button/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_cost_smart_button/static/description/icon.png and /dev/null differ diff --git a/.unported/project_cost_smart_button/static/description/project.png b/.unported/project_cost_smart_button/static/description/project.png deleted file mode 100644 index 0612bc1f..00000000 Binary files a/.unported/project_cost_smart_button/static/description/project.png and /dev/null differ diff --git a/.unported/project_estimation/README.rst b/.unported/project_estimation/README.rst deleted file mode 100644 index 74897fb5..00000000 --- a/.unported/project_estimation/README.rst +++ /dev/null @@ -1,65 +0,0 @@ -Project Estimation -================== -This module defines an ``Estimation`` mode on projects. - -.. contents:: Table of Contents - -Smart Button ------------- -A smart button is added on projects. - -When a project is in ``Estimation`` mode, the button is blue. - -.. image:: static/description/project_smart_button_blue.png - -Otherwise, the button is gray. - -.. image:: static/description/project_smart_button_gray.png - -When I click on the button, a confirmation wizard is opened. -This wizard allows to either enter or exit the estimation mode. - -.. image:: static/description/estimation_mode_exit_wizard.png - -.. image:: static/description/estimation_mode_enter_wizard.png - -Kanban View ------------ -In kanban view of projects, a blue badge is added on projects in estimation mode. - -.. image:: static/description/project_kanban.png - -Also, a filter allows to view only projects that are in estimation mode. - -.. image:: static/description/project_filter.png - -Tasks ------ -In form view of a task, if the task is related to a project in estimation mode, a message is displayed. - -.. image:: static/description/task_form.png - -In list or kanban view of tasks, a filter allows to view tasks related to a project in estimation mode. - -.. image:: static/description/task_filter.png - -Configuration -------------- -By default, when creating or duplicating a project, the new project is NOT in estimation mode. - -This prevents the module from breaking unit tests on other modules. -The estimation mode can be used to alter behavior on projects -(see module project_estimation_material). - -It you desire new projects to be created in estimation mode by default, you may -define the following system parameter: - -.. - - project_estimation_mode_active_default = True - -.. image:: static/description/system_parameter.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_estimation/__init__.py b/.unported/project_estimation/__init__.py deleted file mode 100644 index 8e1164de..00000000 --- a/.unported/project_estimation/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models, wizard diff --git a/.unported/project_estimation/__manifest__.py b/.unported/project_estimation/__manifest__.py deleted file mode 100644 index cbf641f0..00000000 --- a/.unported/project_estimation/__manifest__.py +++ /dev/null @@ -1,20 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Estimation", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "license": "LGPL-3", - "category": "Project", - "summary": "Add an estimation mode on projects", - "depends": ["project", "project_task_date_planned"], - "data": [ - "wizard/project_estimation_enter.xml", - "wizard/project_estimation_exit.xml", - "views/project.xml", - "views/project_task.xml", - ], - "installable": True, -} diff --git a/.unported/project_estimation/i18n/fr.po b/.unported/project_estimation/i18n/fr.po deleted file mode 100644 index e834a52a..00000000 --- a/.unported/project_estimation/i18n/fr.po +++ /dev/null @@ -1,139 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_estimation -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-07-14 16:57+0000\n" -"PO-Revision-Date: 2021-07-14 12:58-0400\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.3\n" - -#. module: project_estimation -#: model_terms:ir.ui.view,arch_db:project_estimation.project_kanban -msgid "" -" - - - - Enter Estimation Mode - project.estimation.enter - form - new - { - 'default_project_id': active_id, - } - - - - Exit From Estimation Mode - project.estimation.exit - form - new - { - 'default_project_id': active_id, - } - - - - Project Form: Add estimation mode - project.project - - - - - - - - - - Project Kanban: add estimation mode - project.project - - - -
- - - Estimation - -
-
-
-
- - - Project Search: add estimation mode - project.project - - - - - - - - - -
diff --git a/.unported/project_estimation/views/project_task.xml b/.unported/project_estimation/views/project_task.xml deleted file mode 100644 index 83d5eea7..00000000 --- a/.unported/project_estimation/views/project_task.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Task Form: add estimation mode - project.task - - -
- - -
-
-
- - - Project Search: add estimation mode - project.task - - - - - - - - - -
diff --git a/.unported/project_estimation/wizard/__init__.py b/.unported/project_estimation/wizard/__init__.py deleted file mode 100644 index 474ef236..00000000 --- a/.unported/project_estimation/wizard/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_estimation_enter, project_estimation_exit diff --git a/.unported/project_estimation/wizard/project_estimation_enter.py b/.unported/project_estimation/wizard/project_estimation_enter.py deleted file mode 100644 index a0de9124..00000000 --- a/.unported/project_estimation/wizard/project_estimation_enter.py +++ /dev/null @@ -1,15 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProjectEstimationEnter(models.TransientModel): - - _name = "project.estimation.enter" - _description = "Project Estimation Mode Enter Wizard" - - project_id = fields.Many2one("project.project") - - def validate(self): - self.project_id.estimation_mode_active = True diff --git a/.unported/project_estimation/wizard/project_estimation_enter.xml b/.unported/project_estimation/wizard/project_estimation_enter.xml deleted file mode 100644 index 6c9aa50e..00000000 --- a/.unported/project_estimation/wizard/project_estimation_enter.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Project Estimation Mode Enter Wizard - project.estimation.enter - -
- - - - - -
-
-
-
-
- -
diff --git a/.unported/project_estimation/wizard/project_estimation_exit.py b/.unported/project_estimation/wizard/project_estimation_exit.py deleted file mode 100644 index 2e72e052..00000000 --- a/.unported/project_estimation/wizard/project_estimation_exit.py +++ /dev/null @@ -1,15 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProjectEstimationExit(models.TransientModel): - - _name = "project.estimation.exit" - _description = "Project Estimation Mode Exit Wizard" - - project_id = fields.Many2one("project.project") - - def validate(self): - self.project_id.estimation_mode_active = False diff --git a/.unported/project_estimation/wizard/project_estimation_exit.xml b/.unported/project_estimation/wizard/project_estimation_exit.xml deleted file mode 100644 index 2244f3f5..00000000 --- a/.unported/project_estimation/wizard/project_estimation_exit.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Project Estimation Mode Exit Wizard - project.estimation.exit - -
- - - - - -
-
-
-
-
- -
diff --git a/.unported/project_estimation_material/README.rst b/.unported/project_estimation_material/README.rst deleted file mode 100644 index 9069c754..00000000 --- a/.unported/project_estimation_material/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -Project Estimation Material -=========================== - -.. contents:: Table of Contents - -Context -------- -The module ``project_material`` allows to consume products on projects. - -It allows you to define ``Material Lines`` on tasks. - -.. image:: static/description/task_material_lines.png - -By default, the module automatically generates inventory operations -when adding or modifying material lines. - -.. image:: static/description/consumption_stock_picking.png - -However, in the context of a project in estimation mode, it is not -appropriate to generate inventory operations. - -Overview --------- -After installing this module, when a project is in estimation mode, -material lines on the tasks will not generate stock operations. - -Because stock operations are not generated, it will also be possible to define -material lines on a task without defining a planned date for the task. - -When exiting the estimation mode, you will be asked to define a planned date on every task. - -.. image:: static/description/project_smart_button.png - -.. image:: static/description/estimation_mode_exit_wizard_with_tasks.png - -And after exiting the estimation mode, stock operations will be generated -for your project. - -.. image:: static/description/task_picking_smart_button.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_estimation_material/__init__.py b/.unported/project_estimation_material/__init__.py deleted file mode 100644 index 8e1164de..00000000 --- a/.unported/project_estimation_material/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models, wizard diff --git a/.unported/project_estimation_material/__manifest__.py b/.unported/project_estimation_material/__manifest__.py deleted file mode 100644 index 25a69bc5..00000000 --- a/.unported/project_estimation_material/__manifest__.py +++ /dev/null @@ -1,15 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Estimation Material", - "version": "1.1.0", - "author": "Numigi", - "maintainer": "Numigi", - "license": "LGPL-3", - "category": "Project", - "summary": "Binding between project estimation and material on tasks", - "depends": ["project_estimation", "project_material"], - "data": ["wizard/project_estimation_exit.xml"], - "installable": True, -} diff --git a/.unported/project_estimation_material/i18n/fr.po b/.unported/project_estimation_material/i18n/fr.po deleted file mode 100644 index ca974bf9..00000000 --- a/.unported/project_estimation_material/i18n/fr.po +++ /dev/null @@ -1,63 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_estimation_material -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-07-14 11:57+0000\n" -"PO-Revision-Date: 2021-07-14 08:03-0400\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.3\n" - -#. module: project_estimation_material -#: model_terms:ir.ui.view,arch_db:project_estimation_material.project_estimation_exit_form -msgid "" -"After validating, you will exit the estimation mode.\n" -" This will trigger inventory operations for the " -"following tasks." -msgstr "" -"À la confirmation, vous sortirez du mode estimation.\n" -"Cela créera les opérations d'inventaire des tâches suivantes." - -#. module: project_estimation_material -#: model_terms:ir.ui.view,arch_db:project_estimation_material.project_estimation_exit_form -msgid "Before proceeding, make sure that every task has a planned date." -msgstr "" -"Avant de valider, veuillez vous assurer que chaque tâche a une date " -"planifiée." - -#. module: project_estimation_material -#: code:addons/project_estimation_material/wizard/project_estimation_exit.py:31 -#, python-format -msgid "Before validating, you must select a planned date on each task." -msgstr "" -"Avant de valider, vous devez sélectionner une date planifiée sur chaque " -"tâche." - -#. module: project_estimation_material -#: model:ir.model,name:project_estimation_material.model_project_estimation_exit -msgid "Project Estimation Mode Exit Wizard" -msgstr "" - -#. module: project_estimation_material -#: model_terms:ir.ui.view,arch_db:project_estimation_material.project_estimation_exit_form -msgid "Task" -msgstr "Tâche" - -#. module: project_estimation_material -#: model:ir.model,name:project_estimation_material.model_project_task_material -msgid "Task Material Consumption" -msgstr "" - -#. module: project_estimation_material -#: model:ir.model.fields,field_description:project_estimation_material.field_project_estimation_exit__task_with_material_ids -msgid "Task With Material" -msgstr "Tâches avec du matériel" diff --git a/.unported/project_estimation_material/models/__init__.py b/.unported/project_estimation_material/models/__init__.py deleted file mode 100644 index 5a7659cb..00000000 --- a/.unported/project_estimation_material/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_task_material diff --git a/.unported/project_estimation_material/models/project_task_material.py b/.unported/project_estimation_material/models/project_task_material.py deleted file mode 100644 index 3c3a69bb..00000000 --- a/.unported/project_estimation_material/models/project_task_material.py +++ /dev/null @@ -1,13 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models - - -class ProjectTaskMaterial(models.Model): - - _inherit = "project.task.material" - - def _run_procurements(self): - if not self.project_id.estimation_mode_active: - return super()._run_procurements() diff --git a/.unported/project_estimation_material/static/description/consumption_stock_picking.png b/.unported/project_estimation_material/static/description/consumption_stock_picking.png deleted file mode 100644 index 63a40ada..00000000 Binary files a/.unported/project_estimation_material/static/description/consumption_stock_picking.png and /dev/null differ diff --git a/.unported/project_estimation_material/static/description/estimation_mode_exit_wizard_with_tasks.png b/.unported/project_estimation_material/static/description/estimation_mode_exit_wizard_with_tasks.png deleted file mode 100644 index e8bfef60..00000000 Binary files a/.unported/project_estimation_material/static/description/estimation_mode_exit_wizard_with_tasks.png and /dev/null differ diff --git a/.unported/project_estimation_material/static/description/icon.png b/.unported/project_estimation_material/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_estimation_material/static/description/icon.png and /dev/null differ diff --git a/.unported/project_estimation_material/static/description/project_smart_button.png b/.unported/project_estimation_material/static/description/project_smart_button.png deleted file mode 100644 index ff607970..00000000 Binary files a/.unported/project_estimation_material/static/description/project_smart_button.png and /dev/null differ diff --git a/.unported/project_estimation_material/static/description/task_material_lines.png b/.unported/project_estimation_material/static/description/task_material_lines.png deleted file mode 100644 index f719db3a..00000000 Binary files a/.unported/project_estimation_material/static/description/task_material_lines.png and /dev/null differ diff --git a/.unported/project_estimation_material/static/description/task_picking_smart_button.png b/.unported/project_estimation_material/static/description/task_picking_smart_button.png deleted file mode 100644 index d5bc8bed..00000000 Binary files a/.unported/project_estimation_material/static/description/task_picking_smart_button.png and /dev/null differ diff --git a/.unported/project_estimation_material/tests/__init__.py b/.unported/project_estimation_material/tests/__init__.py deleted file mode 100644 index 933f1b4b..00000000 --- a/.unported/project_estimation_material/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_estimation_material/tests/test_project_material.py b/.unported/project_estimation_material/tests/test_project_material.py deleted file mode 100644 index 0d793fe1..00000000 --- a/.unported/project_estimation_material/tests/test_project_material.py +++ /dev/null @@ -1,38 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import pytest -from odoo.exceptions import ValidationError -from odoo.addons.project_material.tests.common import TaskMaterialCase - - -class TestProjectMaterial(TaskMaterialCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.project.estimation_mode_active = False - - def test_estimation_mode_active(self): - line = self._create_material_line() - assert line.move_ids - - def test_estimation_mode_inactive(self): - self.project.estimation_mode_active = True - line = self._create_material_line() - assert not line.move_ids - - def test_exit_wizard__set_tasks(self): - wizard = self._make_exit_wizard() - wizard._set_tasks() - assert wizard.task_ids == self.task | self.task_2 - - def test_exit_wizard__validate(self): - line = self._create_material_line() - wizard = self._make_exit_wizard() - wizard.validate() - assert line.move_ids - - def _make_exit_wizard(self): - return self.env["project.estimation.exit"].create( - {"project_id": self.project.id} - ) diff --git a/.unported/project_estimation_material/wizard/__init__.py b/.unported/project_estimation_material/wizard/__init__.py deleted file mode 100644 index 305ce73a..00000000 --- a/.unported/project_estimation_material/wizard/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_estimation_exit diff --git a/.unported/project_estimation_material/wizard/project_estimation_exit.py b/.unported/project_estimation_material/wizard/project_estimation_exit.py deleted file mode 100644 index 63dd15c0..00000000 --- a/.unported/project_estimation_material/wizard/project_estimation_exit.py +++ /dev/null @@ -1,29 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models, fields, _ -from odoo.exceptions import ValidationError - - -class ProjectEstimationExit(models.TransientModel): - - _inherit = "project.estimation.exit" - - task_ids = fields.Many2many( - "project.task", "project_estimation_exit_task_rel", "wizard_id", "task_id" - ) - - @api.onchange("project_id") - def _set_tasks(self): - self.task_ids = self.env["project.task"].search( - [("project_id", "=", self.project_id.id)] - ) - - def validate(self): - super().validate() - self._trigger_procurements() - - def _trigger_procurements(self): - for line in self.project_id.material_line_ids: - if line._should_generate_procurement(): - line._run_procurements() diff --git a/.unported/project_estimation_material/wizard/project_estimation_exit.xml b/.unported/project_estimation_material/wizard/project_estimation_exit.xml deleted file mode 100644 index d0f29ba8..00000000 --- a/.unported/project_estimation_material/wizard/project_estimation_exit.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Project Estimation Mode Exit Wizard: add tasks with material - project.estimation.exit - - - -
-

- After validating, you will exit the estimation mode. - This will trigger inventory operations for the following tasks. -

-

- Before proceeding, make sure that every task has a planned date. -

-
- - - - - - -
-
-
- -
diff --git a/.unported/project_iteration_sale_inheritance/README.rst b/.unported/project_iteration_sale_inheritance/README.rst deleted file mode 100644 index 3c403a36..00000000 --- a/.unported/project_iteration_sale_inheritance/README.rst +++ /dev/null @@ -1,19 +0,0 @@ -Project Iteration Sale Inheritance -================================== -- On the project form, the fields Sale Order and Sale Order Item are always visible. -- On the project form, automatically set the Sale Order and Sale Order Item from the Parent Project - -.. image:: static/description/project_iteration_sale_inheritance.png - -Configuration -------------- -No configuration required apart from module installation. - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) -* Komit (https://komit-consulting.com) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_iteration_sale_inheritance/__init__.py b/.unported/project_iteration_sale_inheritance/__init__.py deleted file mode 100644 index 4a82b29b..00000000 --- a/.unported/project_iteration_sale_inheritance/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import models diff --git a/.unported/project_iteration_sale_inheritance/__manifest__.py b/.unported/project_iteration_sale_inheritance/__manifest__.py deleted file mode 100644 index 4595ee82..00000000 --- a/.unported/project_iteration_sale_inheritance/__manifest__.py +++ /dev/null @@ -1,14 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -{ - "name": "Project Iteration Sale Inheritance", - "summary": "Automatically set the Sale Order and Sale Order Item from the Parent Project", - "version": "12.0.1.0.0", - "website": "https://bit.ly/numigi-com", - "author": "Numigi", - "maintainer": "Numigi", - "license": "AGPL-3", - "depends": ["project_iteration", "sale_timesheet"], - "data": ["views/project_project.xml"], - "installable": True, -} diff --git a/.unported/project_iteration_sale_inheritance/models/__init__.py b/.unported/project_iteration_sale_inheritance/models/__init__.py deleted file mode 100644 index d482b45f..00000000 --- a/.unported/project_iteration_sale_inheritance/models/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import project_project diff --git a/.unported/project_iteration_sale_inheritance/models/project_project.py b/.unported/project_iteration_sale_inheritance/models/project_project.py deleted file mode 100644 index f052b2ac..00000000 --- a/.unported/project_iteration_sale_inheritance/models/project_project.py +++ /dev/null @@ -1,16 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import _, api, models - - -class ProjectProject(models.Model): - _inherit = "project.project" - - @api.onchange("parent_id") - def _onchange_parent_inherit_sale_object(self): - if self.parent_id: - self.sale_order_id = self.parent_id.sale_order_id - self.sale_line_id = self.parent_id.sale_line_id - else: - self.sale_order_id = None - self.sale_line_id = None diff --git a/.unported/project_iteration_sale_inheritance/static/description/icon.png b/.unported/project_iteration_sale_inheritance/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_iteration_sale_inheritance/static/description/icon.png and /dev/null differ diff --git a/.unported/project_iteration_sale_inheritance/static/description/project_iteration_sale_inheritance.png b/.unported/project_iteration_sale_inheritance/static/description/project_iteration_sale_inheritance.png deleted file mode 100644 index 1d6d888c..00000000 Binary files a/.unported/project_iteration_sale_inheritance/static/description/project_iteration_sale_inheritance.png and /dev/null differ diff --git a/.unported/project_iteration_sale_inheritance/tests/__init__.py b/.unported/project_iteration_sale_inheritance/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/.unported/project_iteration_sale_inheritance/tests/test_project_iteration_sale_inheritance.py b/.unported/project_iteration_sale_inheritance/tests/test_project_iteration_sale_inheritance.py deleted file mode 100644 index 51f12833..00000000 --- a/.unported/project_iteration_sale_inheritance/tests/test_project_iteration_sale_inheritance.py +++ /dev/null @@ -1,39 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.tests import common - - -class TestProjectIterationSaleInheritance(common.SavepointCase): - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.project_1 = cls.env["project.project"].create({"name": "P1"}) - cls.product_a = cls.env["product.template"].create( - { - "name": "A1", - "type": "service", - "service_policy": "delivered_timesheet", - "service_tracking": "project_only", - } - ) - cls.partner = cls.env["res.partner"].create({"name": "partner"}) - - def test_child_project_get_sales_info_from_parent(self): - sale_order = self.env["sale.order"].create( - { - "name": "SO001", - "partner_id": self.partner.id, - "order_line": [(0, 0, { - "product_id": self.product_a.product_variant_id.id, - "product_uom_qty": 10, - })] - } - ) - sale_order.action_confirm() - sale_project = sale_order.project_ids[0] - self.project_1.parent_id = sale_project.id - self.project_1._onchange_parent_inherit_sale_object() - self.assertEqual(self.project_1.sale_order_id, sale_project.sale_order_id) - self.assertEqual(self.project_1.sale_line_id, sale_project.sale_line_id) diff --git a/.unported/project_iteration_sale_inheritance/views/project_project.xml b/.unported/project_iteration_sale_inheritance/views/project_project.xml deleted file mode 100644 index bbd83e25..00000000 --- a/.unported/project_iteration_sale_inheritance/views/project_project.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Project Project Form: always show sale information - project.project - - - - {} - - - {} - 1 - - - {} - - - - - diff --git a/.unported/project_kanban_dates/README.rst b/.unported/project_kanban_dates/README.rst deleted file mode 100644 index 79f17a73..00000000 --- a/.unported/project_kanban_dates/README.rst +++ /dev/null @@ -1,20 +0,0 @@ -Project Kanban Dates -==================== - -.. contents:: Table of Contents - -This module adds start dates to project kanban views and planned dates to task kanban views. - -Usage ------ -There is now the start date under project kanban views. - -.. image:: static/description/project.png - -There is also the planned date under task kanban views. - -.. image:: static/description/task.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_kanban_dates/__init__.py b/.unported/project_kanban_dates/__init__.py deleted file mode 100644 index 1440f79e..00000000 --- a/.unported/project_kanban_dates/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_kanban_dates/__manifest__.py b/.unported/project_kanban_dates/__manifest__.py deleted file mode 100644 index daaf84cf..00000000 --- a/.unported/project_kanban_dates/__manifest__.py +++ /dev/null @@ -1,20 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Kanban Dates", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Add the start date to the project kanban view", - "depends": [ - "project_form_with_dates", "project_task_date_planned" - ], - "data": [ - "views/project.xml" - ], - "installable": True, -} diff --git a/.unported/project_kanban_dates/i18n/fr.po b/.unported/project_kanban_dates/i18n/fr.po deleted file mode 100644 index ce838d2f..00000000 --- a/.unported/project_kanban_dates/i18n/fr.po +++ /dev/null @@ -1,23 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_kanban_dates -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-16 20:39+0000\n" -"PO-Revision-Date: 2021-09-16 16:42-0400\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 2.3\n" -"Last-Translator: \n" -"Language: fr\n" - -#. module: project_kanban_dates -#: model_terms:ir.ui.view,arch_db:project_kanban_dates.view_project_kanban -msgid "Start:" -msgstr "Début :" diff --git a/.unported/project_kanban_dates/static/description/icon.png b/.unported/project_kanban_dates/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_kanban_dates/static/description/icon.png and /dev/null differ diff --git a/.unported/project_kanban_dates/static/description/project.png b/.unported/project_kanban_dates/static/description/project.png deleted file mode 100644 index d6d4401d..00000000 Binary files a/.unported/project_kanban_dates/static/description/project.png and /dev/null differ diff --git a/.unported/project_kanban_dates/static/description/task.png b/.unported/project_kanban_dates/static/description/task.png deleted file mode 100644 index 4fe3fbe5..00000000 Binary files a/.unported/project_kanban_dates/static/description/task.png and /dev/null differ diff --git a/.unported/project_kanban_dates/views/project.xml b/.unported/project_kanban_dates/views/project.xml deleted file mode 100644 index aa8f1ec9..00000000 --- a/.unported/project_kanban_dates/views/project.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - project.project.kanban - project.project - - - - - - -
- Start: - - -
-
-
-
- - - project.task.kanban - project.task - - - - - - - - - - - - -
diff --git a/.unported/project_kanban_to_form/README.rst b/.unported/project_kanban_to_form/README.rst deleted file mode 100644 index be27e808..00000000 --- a/.unported/project_kanban_to_form/README.rst +++ /dev/null @@ -1,21 +0,0 @@ -Project Kanban To Form -====================== - -.. contents:: Table of Contents - -Context -------- -In Odoo, when you click on a kanban card, you are redirected to the kanban view of the tasks. - -Description ------------ -This module changes this behavior so that the user is redirected to the form view of the project. - -.. image:: static/description/project_kanban.png - -.. image:: static/description/project_form.png - -Contributors ------------- -* Savoir-faire Linux -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_kanban_to_form/__init__.py b/.unported/project_kanban_to_form/__init__.py deleted file mode 100644 index 9adaa00d..00000000 --- a/.unported/project_kanban_to_form/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# © 2017 Savoir-faire Linux -# © 2022 - today Numigi -# License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). diff --git a/.unported/project_kanban_to_form/__manifest__.py b/.unported/project_kanban_to_form/__manifest__.py deleted file mode 100644 index 59259ef8..00000000 --- a/.unported/project_kanban_to_form/__manifest__.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2017 Savoir-faire Linux -# © 2022 - today Numigi -# License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL). - -{ - "name": "Project Kanban To Form", - "version": "1.0.0", - "author": "Savoir-faire Linux", - "maintainer": "Numigi", - "website": "https://www.numigi.com", - "license": "LGPL-3", - "category": "Project", - "summary": "Access the form view of a project from the kanban", - "depends": ["project"], - "data": ["views/project_project.xml"], - "installable": True, - "application": False, -} diff --git a/.unported/project_kanban_to_form/static/description/icon.png b/.unported/project_kanban_to_form/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_kanban_to_form/static/description/icon.png and /dev/null differ diff --git a/.unported/project_kanban_to_form/static/description/project_form.png b/.unported/project_kanban_to_form/static/description/project_form.png deleted file mode 100644 index a1e16080..00000000 Binary files a/.unported/project_kanban_to_form/static/description/project_form.png and /dev/null differ diff --git a/.unported/project_kanban_to_form/static/description/project_kanban.png b/.unported/project_kanban_to_form/static/description/project_kanban.png deleted file mode 100644 index 6df3c730..00000000 Binary files a/.unported/project_kanban_to_form/static/description/project_kanban.png and /dev/null differ diff --git a/.unported/project_kanban_to_form/static/src/js/project.js b/.unported/project_kanban_to_form/static/src/js/project.js deleted file mode 100644 index 4c29dd6f..00000000 --- a/.unported/project_kanban_to_form/static/src/js/project.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - © 2017 Savoir-faire Linux - © 2022 - today Numigi - License LGPL-3.0 or later (http://www.gnu.org/licenses/LGPL.html). -*/ -odoo.define('project_kanban_to_form', function (require) { -'use strict'; - -require('project.update_kanban'); -var KanbanRecord = require('web.KanbanRecord'); - -KanbanRecord.include({ - _openRecord() { - if (this.modelName === 'project.project') { - this._openProjectForm() - } else { - this._super.apply(this, arguments); - } - }, - /** - * This method was copied from the method _openRecord of web.KanbanRecord - */ - _openProjectForm() { - if (this.$el.hasClass('o_currently_dragged')) { - return; - } - var editMode = this.$el.hasClass('oe_kanban_global_click_edit'); - this.trigger_up('open_record', { - id: this.db_id, - mode: editMode ? 'edit' : 'readonly', - }); - } -}); -}); diff --git a/.unported/project_kanban_to_form/views/project_project.xml b/.unported/project_kanban_to_form/views/project_project.xml deleted file mode 100644 index 6770e5ab..00000000 --- a/.unported/project_kanban_to_form/views/project_project.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/.unported/project_material_closed/README.rst b/.unported/project_material_closed/README.rst deleted file mode 100644 index 7c8dfa0c..00000000 --- a/.unported/project_material_closed/README.rst +++ /dev/null @@ -1,25 +0,0 @@ -Project Material Stage Closed -============================= - -.. contents:: Table of Contents - -Context -------- -The module ``project_material`` allows to consume products on tasks. - -The module ``project_closed`` allows to close a project without archiving it. - -Overview --------- -In the list view of material lines, two new filters are available. - -.. image:: static/description/project_task_material_list.png - -* Open Project: shows material lines of projects with an open stage -* Closed Project: shows material lines of projects with a closed stage - -By default, the ``Open Project`` filter is selected. - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_material_closed/__init__.py b/.unported/project_material_closed/__init__.py deleted file mode 100644 index 157e543a..00000000 --- a/.unported/project_material_closed/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_material_closed/__manifest__.py b/.unported/project_material_closed/__manifest__.py deleted file mode 100644 index ba520b3a..00000000 --- a/.unported/project_material_closed/__manifest__.py +++ /dev/null @@ -1,16 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Material Stage Closed", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Hide material lines of closed projects", - "depends": ["project_stage", "project_material"], - "data": ["views/project_task_material.xml"], - "installable": True, -} diff --git a/.unported/project_material_closed/i18n/fr.po b/.unported/project_material_closed/i18n/fr.po deleted file mode 100644 index 84c31df8..00000000 --- a/.unported/project_material_closed/i18n/fr.po +++ /dev/null @@ -1,38 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_material_closed -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-16 14:02+0000\n" -"PO-Revision-Date: 2021-09-16 10:03-0400\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.3\n" - -#. module: project_material_closed -#: model:ir.model.fields,field_description:project_material_closed.field_project_task_material__closed -msgid "Closed" -msgstr "Fermé" - -#. module: project_material_closed -#: model_terms:ir.ui.view,arch_db:project_material_closed.project_task_material_search -msgid "Closed Project" -msgstr "Projet fermé" - -#. module: project_material_closed -#: model_terms:ir.ui.view,arch_db:project_material_closed.project_task_material_search -msgid "Open Project" -msgstr "Projet ouvert" - -#. module: project_material_closed -#: model:ir.model,name:project_material_closed.model_project_task_material -msgid "Task Material Consumption" -msgstr "" diff --git a/.unported/project_material_closed/models/__init__.py b/.unported/project_material_closed/models/__init__.py deleted file mode 100644 index 5a7659cb..00000000 --- a/.unported/project_material_closed/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_task_material diff --git a/.unported/project_material_closed/models/project_task_material.py b/.unported/project_material_closed/models/project_task_material.py deleted file mode 100644 index f067f818..00000000 --- a/.unported/project_material_closed/models/project_task_material.py +++ /dev/null @@ -1,11 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import fields, models - - -class ProjectTaskMaterial(models.Model): - - _inherit = "project.task.material" - - closed = fields.Boolean(related="project_id.closed", store=True) diff --git a/.unported/project_material_closed/static/description/icon.png b/.unported/project_material_closed/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_material_closed/static/description/icon.png and /dev/null differ diff --git a/.unported/project_material_closed/static/description/project_task_material_list.png b/.unported/project_material_closed/static/description/project_task_material_list.png deleted file mode 100644 index e4104a9b..00000000 Binary files a/.unported/project_material_closed/static/description/project_task_material_list.png and /dev/null differ diff --git a/.unported/project_material_closed/views/project_task_material.xml b/.unported/project_material_closed/views/project_task_material.xml deleted file mode 100644 index 2d7f2e30..00000000 --- a/.unported/project_material_closed/views/project_task_material.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Project Material Line Search: add open / closed project filters - project.task.material - - - - - - - - - - - - {'search_default_open': 1} - - - diff --git a/.unported/project_material_progress/README.rst b/.unported/project_material_progress/README.rst deleted file mode 100644 index 704f452a..00000000 --- a/.unported/project_material_progress/README.rst +++ /dev/null @@ -1,35 +0,0 @@ -Project Material Progress -========================= - -.. contents:: Table of Contents - -Overview --------- -This module adds a progress bar on tasks. - -This bar shows the percentage of the products that have been prepared (or consumed). - -.. image:: static/description/task_form.png - -Kanban / List Views -------------------- -This progress bar is also visible on list and kanban views of tasks. - -.. image:: static/description/task_list.png - -.. image:: static/description/task_kanban.png - -In the kanban view, if a task has no material line, the progress bar is hidden. - -Filters -~~~~~~~ -Two new filters are added on tasks by the module. - -* ``Has Material``: show only tasks with at least one material line -* ``Material Prepared 100%``: show only tasks with material prepared at 100% - -.. image:: static/description/task_filters.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_material_progress/__init__.py b/.unported/project_material_progress/__init__.py deleted file mode 100644 index 157e543a..00000000 --- a/.unported/project_material_progress/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_material_progress/__manifest__.py b/.unported/project_material_progress/__manifest__.py deleted file mode 100644 index 95a714de..00000000 --- a/.unported/project_material_progress/__manifest__.py +++ /dev/null @@ -1,16 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Material Progress", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Show the progress of material consumption on tasks", - "depends": ["project_material"], - "data": ["views/project_task.xml"], - "installable": True, -} diff --git a/.unported/project_material_progress/i18n/fr.po b/.unported/project_material_progress/i18n/fr.po deleted file mode 100644 index 080f6966..00000000 --- a/.unported/project_material_progress/i18n/fr.po +++ /dev/null @@ -1,44 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_material_progress -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-03 19:52+0000\n" -"PO-Revision-Date: 2021-11-03 15:53-0400\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.3\n" - -#. module: project_material_progress -#: model:ir.model.fields,field_description:project_material_progress.field_project_task__has_material -#: model_terms:ir.ui.view,arch_db:project_material_progress.view_task_search -msgid "Has Material" -msgstr "Contient des pièces" - -#. module: project_material_progress -#: model_terms:ir.ui.view,arch_db:project_material_progress.view_task_search -msgid "Material Prepared 100%" -msgstr "Pièces préparées à 100%" - -#. module: project_material_progress -#: model:ir.model.fields,field_description:project_material_progress.field_project_task__material_progress -msgid "Material Progress" -msgstr "Progrès du matériel" - -#. module: project_material_progress -#: model_terms:ir.ui.view,arch_db:project_material_progress.project_task_form -msgid "Progression" -msgstr "Progrès" - -#. module: project_material_progress -#: model:ir.model,name:project_material_progress.model_project_task -msgid "Task" -msgstr "Tâche" diff --git a/.unported/project_material_progress/models/__init__.py b/.unported/project_material_progress/models/__init__.py deleted file mode 100644 index 10c6958f..00000000 --- a/.unported/project_material_progress/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_task diff --git a/.unported/project_material_progress/models/project_task.py b/.unported/project_material_progress/models/project_task.py deleted file mode 100644 index 0ebe23b2..00000000 --- a/.unported/project_material_progress/models/project_task.py +++ /dev/null @@ -1,50 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models - - -class ProjectTask(models.Model): - - _inherit = "project.task" - - has_material = fields.Boolean( - store=True, compute="_compute_has_material", compute_sudo=True - ) - material_progress = fields.Float( - store=True, compute="_compute_material_progress", compute_sudo=True - ) - - @api.depends("material_line_ids") - def _compute_has_material(self): - for task in self: - task.has_material = bool(task.material_line_ids) - - @api.depends( - "material_line_ids.consumed_qty", - "material_line_ids.prepared_qty", - "material_line_ids.initial_qty", - ) - def _compute_material_progress(self): - for task in self: - task.material_progress = task._get_material_progress() - - def _get_material_progress(self): - units = self.env.ref("uom.product_uom_unit") - units_category = units.category_id - material_lines = self.material_line_ids.filtered( - lambda l: l.product_uom_id.category_id == units_category - ) - prepared = sum( - l.product_uom_id._compute_quantity(l.prepared_qty, units) - for l in material_lines - ) - consumed = sum( - l.product_uom_id._compute_quantity(l.consumed_qty, units) - for l in material_lines - ) - initial = sum( - l.product_uom_id._compute_quantity(l.initial_qty, units) - for l in material_lines - ) - return max(prepared, consumed) * 100 / initial if initial else 0 diff --git a/.unported/project_material_progress/static/description/icon.png b/.unported/project_material_progress/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_material_progress/static/description/icon.png and /dev/null differ diff --git a/.unported/project_material_progress/static/description/project_task_material_list.png b/.unported/project_material_progress/static/description/project_task_material_list.png deleted file mode 100644 index e4104a9b..00000000 Binary files a/.unported/project_material_progress/static/description/project_task_material_list.png and /dev/null differ diff --git a/.unported/project_material_progress/static/description/task_filters.png b/.unported/project_material_progress/static/description/task_filters.png deleted file mode 100644 index 6f90fa79..00000000 Binary files a/.unported/project_material_progress/static/description/task_filters.png and /dev/null differ diff --git a/.unported/project_material_progress/static/description/task_form.png b/.unported/project_material_progress/static/description/task_form.png deleted file mode 100644 index 46631a7c..00000000 Binary files a/.unported/project_material_progress/static/description/task_form.png and /dev/null differ diff --git a/.unported/project_material_progress/static/description/task_kanban.png b/.unported/project_material_progress/static/description/task_kanban.png deleted file mode 100644 index e74ae8ad..00000000 Binary files a/.unported/project_material_progress/static/description/task_kanban.png and /dev/null differ diff --git a/.unported/project_material_progress/static/description/task_list.png b/.unported/project_material_progress/static/description/task_list.png deleted file mode 100644 index 7abd190c..00000000 Binary files a/.unported/project_material_progress/static/description/task_list.png and /dev/null differ diff --git a/.unported/project_material_progress/tests/__init__.py b/.unported/project_material_progress/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/.unported/project_material_progress/tests/test_task_material.py b/.unported/project_material_progress/tests/test_task_material.py deleted file mode 100644 index 6c6dd6c8..00000000 --- a/.unported/project_material_progress/tests/test_task_material.py +++ /dev/null @@ -1,51 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.addons.project_material.tests.common import TaskMaterialCase - - -class TestOneStep(TaskMaterialCase): - def test_progress(self): - line = self._create_material_line(initial_qty=10) - consumption_move = line.move_ids - self._force_transfer_move(consumption_move, 4) - assert self.task.material_progress == 40 # 4 / 10 * 100 - - def test_has_material(self): - assert not self.task.has_material - self._create_material_line(initial_qty=1) - assert self.task.has_material - - -class TestTwoSteps(TaskMaterialCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.warehouse.consu_steps = "two_steps" - cls.uom_kg = cls.env.ref("uom.product_uom_kgm") - cls.uom_dozen = cls.env.ref("uom.product_uom_dozen") - - def test_progress(self): - line = self._create_material_line(initial_qty=10) - preparation_move = line.move_ids.move_orig_ids - self._force_transfer_move(preparation_move, 4) - assert self.task.material_progress == 40 # 4 / 10 * 100 - - def test_uom_kg(self): - self._set_product_uom(self.product_a, self.uom_kg) - line = self._create_material_line(initial_qty=1) - preparation_move = line.move_ids.move_orig_ids - self._force_transfer_move(preparation_move, 1) - assert self.task.material_progress == 0 - - def test_units_and_dozens(self): - product_b = self.product_a.copy() - self._set_product_uom(product_b, self.uom_dozen) - line_a = self._create_material_line(initial_qty=1, product=self.product_a) - line_b = self._create_material_line(initial_qty=2, product=product_b) - preparation_move = line_a.move_ids.move_orig_ids - self._force_transfer_move(preparation_move, 1) - assert self.task.material_progress == 4 # 1 / (1 + 12 * 2) * 100 - - def _set_product_uom(self, product, uom): - product.write({"uom_id": uom.id, "uom_po_id": uom.id}) diff --git a/.unported/project_material_progress/views/project_task.xml b/.unported/project_material_progress/views/project_task.xml deleted file mode 100644 index 654af203..00000000 --- a/.unported/project_material_progress/views/project_task.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Project Task Form: add material progress - project.task - - - -
- - - -
-
-
-
- - - Project Task List: add material progress - project.task - - - - - - - - - - project.task.kanban: add material progress - project.task - - - - - - - - - - - - - - - Task Search: add material progress filters - project.task - - - - - - - - - - - -
diff --git a/.unported/project_material_quantity_filters/README.rst b/.unported/project_material_quantity_filters/README.rst deleted file mode 100644 index 0b1c49e8..00000000 --- a/.unported/project_material_quantity_filters/README.rst +++ /dev/null @@ -1,21 +0,0 @@ -Project Material Quantity Filters -================================= -This module adds extra filters the list of task material lines. - -.. image:: static/description/task_material_list.png - -Prepared Qty VS Initial ------------------------ -Shows the material lines with a prepared quantity different from the initial quantity. - -Consumed Qty VS Prepared ------------------------- -Shows the material lines with a consumed quantity different from the prepared quantity. - -Consumed Qty VS Initial ------------------------ -Shows the material lines with a consumed quantity different from the initial quantity. - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_material_quantity_filters/__init__.py b/.unported/project_material_quantity_filters/__init__.py deleted file mode 100644 index 2b433349..00000000 --- a/.unported/project_material_quantity_filters/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2018 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_material_quantity_filters/__manifest__.py b/.unported/project_material_quantity_filters/__manifest__.py deleted file mode 100644 index 206fa412..00000000 --- a/.unported/project_material_quantity_filters/__manifest__.py +++ /dev/null @@ -1,20 +0,0 @@ -# © 2018 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Material Quantity Filters', - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Projects', - 'summary': 'Add extra filters to task material lines', - 'depends': [ - 'project_material', - ], - 'data': [ - 'views/project_task_material.xml', - ], - 'installable': True, -} diff --git a/.unported/project_material_quantity_filters/i18n/fr.po b/.unported/project_material_quantity_filters/i18n/fr.po deleted file mode 100644 index 6e7fd49c..00000000 --- a/.unported/project_material_quantity_filters/i18n/fr.po +++ /dev/null @@ -1,53 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_material_quantity_filters -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-08 17:01+0000\n" -"PO-Revision-Date: 2020-12-08 12:01-0500\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.0.6\n" - -#. module: project_material_quantity_filters -#: model_terms:ir.ui.view,arch_db:project_material_quantity_filters.task_material_search -msgid "Consumed Qty VS Initial" -msgstr "Qté consommée VS initiale" - -#. module: project_material_quantity_filters -#: model_terms:ir.ui.view,arch_db:project_material_quantity_filters.task_material_search -msgid "Consumed Qty VS Prepared" -msgstr "Qté consommée VS préparée" - -#. module: project_material_quantity_filters -#: model:ir.model.fields,field_description:project_material_quantity_filters.field_project_task_material__consumed_versus_initial -msgid "Consumed Versus Initial" -msgstr "Qté consommée VS initiale" - -#. module: project_material_quantity_filters -#: model:ir.model.fields,field_description:project_material_quantity_filters.field_project_task_material__consumed_versus_prepared -msgid "Consumed Versus Prepared" -msgstr "Qté consommée VS préparée" - -#. module: project_material_quantity_filters -#: model_terms:ir.ui.view,arch_db:project_material_quantity_filters.task_material_search -msgid "Prepared Qty VS Initial" -msgstr "Qté préparée VS initiale" - -#. module: project_material_quantity_filters -#: model:ir.model.fields,field_description:project_material_quantity_filters.field_project_task_material__prepared_versus_initial -msgid "Prepared Versus Initial" -msgstr "Qté préparée VS initiale" - -#. module: project_material_quantity_filters -#: model:ir.model,name:project_material_quantity_filters.model_project_task_material -msgid "Task Material Consumption" -msgstr "" diff --git a/.unported/project_material_quantity_filters/models/__init__.py b/.unported/project_material_quantity_filters/models/__init__.py deleted file mode 100644 index a2a58a75..00000000 --- a/.unported/project_material_quantity_filters/models/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import ( - project_task_material, -) diff --git a/.unported/project_material_quantity_filters/models/project_task_material.py b/.unported/project_material_quantity_filters/models/project_task_material.py deleted file mode 100644 index 5ac1d3c6..00000000 --- a/.unported/project_material_quantity_filters/models/project_task_material.py +++ /dev/null @@ -1,49 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models -from odoo.tools import float_compare - - -class TaskMaterialLine(models.Model): - - _inherit = 'project.task.material' - - prepared_versus_initial = fields.Boolean( - compute="_compute_prepared_versus_initial", - store=True, - compute_sudo=True, - ) - - consumed_versus_prepared = fields.Boolean( - compute="_compute_consumed_versus_prepared", - store=True, - compute_sudo=True, - ) - - consumed_versus_initial = fields.Boolean( - compute="_compute_consumed_versus_initial", - store=True, - compute_sudo=True, - ) - - @api.depends('prepared_qty', 'initial_qty') - def _compute_prepared_versus_initial(self): - for line in self: - line.prepared_versus_initial = float_compare( - line.prepared_qty, line.initial_qty, 2 - ) != 0 - - @api.depends('consumed_qty', 'prepared_qty') - def _compute_consumed_versus_prepared(self): - for line in self: - line.consumed_versus_prepared = float_compare( - line.consumed_qty, line.prepared_qty, 2 - ) != 0 - - @api.depends('consumed_qty', 'initial_qty') - def _compute_consumed_versus_initial(self): - for line in self: - line.consumed_versus_initial = float_compare( - line.consumed_qty, line.initial_qty, 2 - ) != 0 diff --git a/.unported/project_material_quantity_filters/static/description/icon.png b/.unported/project_material_quantity_filters/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_material_quantity_filters/static/description/icon.png and /dev/null differ diff --git a/.unported/project_material_quantity_filters/static/description/task_material_list.png b/.unported/project_material_quantity_filters/static/description/task_material_list.png deleted file mode 100644 index 246e9eeb..00000000 Binary files a/.unported/project_material_quantity_filters/static/description/task_material_list.png and /dev/null differ diff --git a/.unported/project_material_quantity_filters/tests/__init__.py b/.unported/project_material_quantity_filters/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/.unported/project_material_quantity_filters/tests/test_task_material.py b/.unported/project_material_quantity_filters/tests/test_task_material.py deleted file mode 100644 index e5a589ef..00000000 --- a/.unported/project_material_quantity_filters/tests/test_task_material.py +++ /dev/null @@ -1,37 +0,0 @@ -# © 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.addons.project_material.tests.common import TaskMaterialCase - - -class TestPreparationStep(TaskMaterialCase): - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.warehouse.consu_steps = 'two_steps' - cls.initial_qty = 10 - cls.line = cls._create_material_line(initial_qty=cls.initial_qty) - cls.consumption_move = cls.line.move_ids - cls.preparation_move = cls.line.move_ids.move_orig_ids - - def test_prepared_and_consumed(self): - self._force_transfer_move(self.preparation_move, 10) - self._force_transfer_move(self.consumption_move, 10) - assert not self.line.prepared_versus_initial - assert not self.line.consumed_versus_initial - assert not self.line.consumed_versus_prepared - - def test_prepared_and_not_consumed(self): - self._force_transfer_move(self.preparation_move, 10) - self._force_transfer_move(self.consumption_move, 1) - assert not self.line.prepared_versus_initial - assert self.line.consumed_versus_initial - assert self.line.consumed_versus_prepared - - def test_not_prepared_and_not_consumed(self): - self._force_transfer_move(self.preparation_move, 1) - self._force_transfer_move(self.consumption_move, 1) - assert self.line.prepared_versus_initial - assert self.line.consumed_versus_initial - assert not self.line.consumed_versus_prepared diff --git a/.unported/project_material_quantity_filters/views/project_task_material.xml b/.unported/project_material_quantity_filters/views/project_task_material.xml deleted file mode 100644 index 3881cf05..00000000 --- a/.unported/project_material_quantity_filters/views/project_task_material.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Task Material Search: Add extra filters - project.task.material - - - - - - - - - - - - diff --git a/.unported/project_milestone_dependency/README.rst b/.unported/project_milestone_dependency/README.rst deleted file mode 100644 index 7ce5e55f..00000000 --- a/.unported/project_milestone_dependency/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -Project Milestone Dependencies -============================== - -.. contents:: Table of Contents - -Description ------------ -This module allows to manage Milestone Dependencies. - -Overview --------- -As a user who can manage Milestones, I open the form view of a Milestone, I notice a new tab ``Dependencies``. - -.. image:: static/description/dependencies_tab_milestone_form.png - -I also notice that the field ``Project Tasks`` is moved into a new tab ``Tasks``. - -.. image:: static/description/tasks_tab_milestone_form.png - -Usage ------ - -As a user who can manage Milestones, I go to the form view of a Milestone and I click on ``Add line`` from the ``Dependencies`` tab: - -.. image:: static/description/add_milestone_dependencies.png - -I notice that the Milestones are filtered on the Project assigned on the current Milestone. - -.. image:: static/description/milestones_filtered_by_current_project.png - -It is impossible to have recursion on dependencies. If this is the case, a blocking message is displayed. - -Example: -~~~~~~~~ -- If ``Milestone 1`` depends of ``Milestone 2`` - -.. image:: static/description/Milestone-2_dependsOf_Milestone-1.png - -- When user tries to add ``Milestone 2`` in ``Milestone 1`` dependencies, the blocking message is displayed. - -.. image:: static/description/recursion_blocking_message.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_milestone_dependency/__init__.py b/.unported/project_milestone_dependency/__init__.py deleted file mode 100644 index 9e9bc013..00000000 --- a/.unported/project_milestone_dependency/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_milestone_dependency/__manifest__.py b/.unported/project_milestone_dependency/__manifest__.py deleted file mode 100644 index af97497b..00000000 --- a/.unported/project_milestone_dependency/__manifest__.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Milestone Dependency", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Add dependencies between Milestones", - "depends": ["project_milestone_start_date"], - "data": [ - "views/project_milestone.xml", - ], - "installable": True, -} diff --git a/.unported/project_milestone_dependency/i18n/fr.po b/.unported/project_milestone_dependency/i18n/fr.po deleted file mode 100644 index e8b2b211..00000000 --- a/.unported/project_milestone_dependency/i18n/fr.po +++ /dev/null @@ -1,39 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_milestone_dependency -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-29 17:52+0000\n" -"PO-Revision-Date: 2022-08-29 17:52+0000\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_dependency -#: model:ir.model.fields,field_description:project_milestone_dependency.field_project_milestone__child_ids -#: model_terms:ir.ui.view,arch_db:project_milestone_dependency.project_milestone_dependencies_view_form -msgid "Dependencies" -msgstr "Dépendances" - -#. module: project_milestone_dependency -#: model:ir.model,name:project_milestone_dependency.model_project_milestone -msgid "Project Milestone" -msgstr "Jalon du projet" - -#. module: project_milestone_dependency -#: model_terms:ir.ui.view,arch_db:project_milestone_dependency.project_milestone_dependencies_view_form -msgid "Tasks" -msgstr "Tâches" - -#. module: project_milestone_dependency -#: code:addons/project_milestone_dependency/models/project_milestone.py:21 -#, python-format -msgid "You cannot create recursive dependencies between milestones." -msgstr "Vous ne pouvez pas créer de dépendances récursives entre les jalons." - diff --git a/.unported/project_milestone_dependency/models/__init__.py b/.unported/project_milestone_dependency/models/__init__.py deleted file mode 100644 index 94d69f2c..00000000 --- a/.unported/project_milestone_dependency/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_milestone diff --git a/.unported/project_milestone_dependency/models/project_milestone.py b/.unported/project_milestone_dependency/models/project_milestone.py deleted file mode 100644 index 856d1f7d..00000000 --- a/.unported/project_milestone_dependency/models/project_milestone.py +++ /dev/null @@ -1,21 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields, api, _ -from odoo.exceptions import ValidationError - - -class ProjectMilestone(models.Model): - - _inherit = "project.milestone" - - child_ids = fields.Many2many('project.milestone', - 'rel_project_milestone_dependencies', - 'milestone_id', 'child_id', - string="Dependencies") - - @api.constrains('child_ids') - def _check_recursion(self): - if not self._check_m2m_recursion('child_ids'): - raise ValidationError(_("You cannot create recursive " - "dependencies between milestones.")) diff --git a/.unported/project_milestone_dependency/static/description/Milestone-2_dependsOf_Milestone-1.png b/.unported/project_milestone_dependency/static/description/Milestone-2_dependsOf_Milestone-1.png deleted file mode 100644 index 194ea8da..00000000 Binary files a/.unported/project_milestone_dependency/static/description/Milestone-2_dependsOf_Milestone-1.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/add_milestone_dependencies.png b/.unported/project_milestone_dependency/static/description/add_milestone_dependencies.png deleted file mode 100644 index 945c07f1..00000000 Binary files a/.unported/project_milestone_dependency/static/description/add_milestone_dependencies.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/dependencies_tab_milestone_form.png b/.unported/project_milestone_dependency/static/description/dependencies_tab_milestone_form.png deleted file mode 100644 index 9544e84c..00000000 Binary files a/.unported/project_milestone_dependency/static/description/dependencies_tab_milestone_form.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/field_date_start_form_view.png b/.unported/project_milestone_dependency/static/description/field_date_start_form_view.png deleted file mode 100644 index 8b1df17e..00000000 Binary files a/.unported/project_milestone_dependency/static/description/field_date_start_form_view.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/field_date_start_list_view.png b/.unported/project_milestone_dependency/static/description/field_date_start_list_view.png deleted file mode 100644 index 9d182554..00000000 Binary files a/.unported/project_milestone_dependency/static/description/field_date_start_list_view.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/field_date_start_milestone_project_form.png b/.unported/project_milestone_dependency/static/description/field_date_start_milestone_project_form.png deleted file mode 100644 index 29d8af82..00000000 Binary files a/.unported/project_milestone_dependency/static/description/field_date_start_milestone_project_form.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/icon.png b/.unported/project_milestone_dependency/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_dependency/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/milestones_filtered_by_current_project.png b/.unported/project_milestone_dependency/static/description/milestones_filtered_by_current_project.png deleted file mode 100644 index 641900d1..00000000 Binary files a/.unported/project_milestone_dependency/static/description/milestones_filtered_by_current_project.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/recursion_blocking_message.png b/.unported/project_milestone_dependency/static/description/recursion_blocking_message.png deleted file mode 100644 index 1e5cb4d8..00000000 Binary files a/.unported/project_milestone_dependency/static/description/recursion_blocking_message.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/static/description/tasks_tab_milestone_form.png b/.unported/project_milestone_dependency/static/description/tasks_tab_milestone_form.png deleted file mode 100644 index 58a6eaa1..00000000 Binary files a/.unported/project_milestone_dependency/static/description/tasks_tab_milestone_form.png and /dev/null differ diff --git a/.unported/project_milestone_dependency/tests/__init__.py b/.unported/project_milestone_dependency/tests/__init__.py deleted file mode 100644 index c7aba8f1..00000000 --- a/.unported/project_milestone_dependency/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import test_project_milestone_dependencies diff --git a/.unported/project_milestone_dependency/tests/test_project_milestone_dependencies.py b/.unported/project_milestone_dependency/tests/test_project_milestone_dependencies.py deleted file mode 100644 index 1a6cd776..00000000 --- a/.unported/project_milestone_dependency/tests/test_project_milestone_dependencies.py +++ /dev/null @@ -1,29 +0,0 @@ -# © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.tests.common import SavepointCase -from odoo.exceptions import ValidationError - - -class TestProjectMilestoneDependencies(SavepointCase): - - @classmethod - def setUpClass(cls): - super().setUpClass() - - cls.project = cls.env["project.project"].create({"name": "My Project"}) - - cls.milestone_1 = cls.env["project.milestone"].create( - {"name": "Milestone 1", "project_id": cls.project.id} - ) - - cls.milestone_2 = cls.env["project.milestone"].create({ - "name": "Milestone 2", - "project_id": cls.project.id, - "child_ids": [(4, cls.milestone_1.id)] - }) - - def test_project_milestone_dependencies_recursion(self): - with self.assertRaises(ValidationError): - self.milestone_1.write({"child_ids": [(4, self.milestone_2.id)]}) - diff --git a/.unported/project_milestone_dependency/views/project.xml b/.unported/project_milestone_dependency/views/project.xml deleted file mode 100644 index 53ea47ec..00000000 --- a/.unported/project_milestone_dependency/views/project.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - Project Milestones Add Start Date Form - project.project - - - - - - - - - diff --git a/.unported/project_milestone_dependency/views/project_milestone.xml b/.unported/project_milestone_dependency/views/project_milestone.xml deleted file mode 100644 index b6016ce2..00000000 --- a/.unported/project_milestone_dependency/views/project_milestone.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Project Milestone Form: Add Dependencies Tab - project.milestone - 20 - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.unported/project_milestone_remaining_hours/README.rst b/.unported/project_milestone_remaining_hours/README.rst deleted file mode 100644 index 5b495349..00000000 --- a/.unported/project_milestone_remaining_hours/README.rst +++ /dev/null @@ -1,46 +0,0 @@ -Project Milestone Remaining Hours -================================= -This module allows to compute the ``Remaining Hours`` of a Project Milestone. - -.. contents:: Table of Contents - -Context -------- -The module `project_milestone_estimated_hours `_ -allows to define ``Estimated Hours`` for a Project Milestone. - -The module `project_milestone_spent_hours `_ -adds a new computed field ``Total Hours`` which represents the sum of timesheets of active tasks associated to the milestone. - -This module adds the field ``Remaining Hours`` which is computed based on the ``Estimated Hours`` and ``Total Hours`` fields. - -Overview --------- -As a user with access to Project Milestones, I go to the form view of a Milestone. - -I notice that a new ``Remaining Hours`` field is available. - -.. image:: static/description/milestone_rh.png - -This field is read-only and is calculated according to the following formula: - -``Estimated Hours`` - ``Total Hours`` = ``Remaining Hours`` - -Project Milestone List View ---------------------------- - -From the Project form, under the Milestones tab, I see that the ``Remaining Hours`` field is displayed in the Milestones List View. - -.. image:: static/description/project_milestone_rh.png - -From the menu Project > Configuration > All Milestones, I see that the ``Remaining Hours`` field is displayed in the Milestones List View. - -.. image:: static/description/milestone_list_rh.PNG - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_milestone_remaining_hours/__init__.py b/.unported/project_milestone_remaining_hours/__init__.py deleted file mode 100644 index dca48a74..00000000 --- a/.unported/project_milestone_remaining_hours/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models \ No newline at end of file diff --git a/.unported/project_milestone_remaining_hours/__manifest__.py b/.unported/project_milestone_remaining_hours/__manifest__.py deleted file mode 100644 index 4b705102..00000000 --- a/.unported/project_milestone_remaining_hours/__manifest__.py +++ /dev/null @@ -1,22 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Milestone Remaining Hours', - 'version': '1.0.0', - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - 'summary': "This module allow to compute remaining hours of a project milestone", - 'depends': [ - 'project_milestone_estimated_hours', - 'project_milestone_spent_hours' - ], - 'data': [ - 'views/project_milestone.xml', - 'views/project_project.xml', - ], - 'installable': True, -} diff --git a/.unported/project_milestone_remaining_hours/i18n/fr.po b/.unported/project_milestone_remaining_hours/i18n/fr.po deleted file mode 100644 index 3446dc28..00000000 --- a/.unported/project_milestone_remaining_hours/i18n/fr.po +++ /dev/null @@ -1,27 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# *project_role_milestone -# -# Translators: -# Abdellatif Benzbiria ,2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-30\n" -"PO-Revision-Date: 2022-08-30\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_remaining_hours -#: model:ir.model.fields,field_description:project_milestone_remaining_hours.field_project_milestone__remaining_hours -#: model_terms:ir.ui.view,arch_db:project_milestone_responsible.project_milestone_view_search -msgid "Remaining Hours" -msgstr "Heures restantes" - diff --git a/.unported/project_milestone_remaining_hours/models/__init__.py b/.unported/project_milestone_remaining_hours/models/__init__.py deleted file mode 100644 index ebecf304..00000000 --- a/.unported/project_milestone_remaining_hours/models/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_milestone - diff --git a/.unported/project_milestone_remaining_hours/models/project_milestone.py b/.unported/project_milestone_remaining_hours/models/project_milestone.py deleted file mode 100644 index 3b648226..00000000 --- a/.unported/project_milestone_remaining_hours/models/project_milestone.py +++ /dev/null @@ -1,30 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, models, fields - - -class ProjectMilestone(models.Model): - - _inherit = "project.milestone" - - remaining_hours = fields.Float(compute='_compute_remaining_hours', string="Remaining Hours") - - - @api.depends("estimated_hours", "total_hours") - def _compute_remaining_hours(self): - for rec in self: - rec.remaining_hours = rec.estimated_hours - rec.total_hours - - @api.model - def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True): - res = super(ProjectMilestone, self).read_group(domain, fields, groupby, offset=offset, limit=limit, - orderby=orderby, lazy=lazy) - if 'remaining_hours' in fields: - for line in res: - if '__domain' in line: - lines = self.search(line['__domain']) - remaining_hours = 0.0 - for record in lines: - remaining_hours += record.remaining_hours - line['remaining_hours'] = remaining_hours - return res diff --git a/.unported/project_milestone_remaining_hours/static/description/icon.png b/.unported/project_milestone_remaining_hours/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_remaining_hours/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_remaining_hours/static/description/milestone_list_rh.PNG b/.unported/project_milestone_remaining_hours/static/description/milestone_list_rh.PNG deleted file mode 100644 index ff88103b..00000000 Binary files a/.unported/project_milestone_remaining_hours/static/description/milestone_list_rh.PNG and /dev/null differ diff --git a/.unported/project_milestone_remaining_hours/static/description/milestone_rh.png b/.unported/project_milestone_remaining_hours/static/description/milestone_rh.png deleted file mode 100644 index 5ce8ba68..00000000 Binary files a/.unported/project_milestone_remaining_hours/static/description/milestone_rh.png and /dev/null differ diff --git a/.unported/project_milestone_remaining_hours/static/description/project_milestone_rh.png b/.unported/project_milestone_remaining_hours/static/description/project_milestone_rh.png deleted file mode 100644 index 1632ca46..00000000 Binary files a/.unported/project_milestone_remaining_hours/static/description/project_milestone_rh.png and /dev/null differ diff --git a/.unported/project_milestone_remaining_hours/views/project_milestone.xml b/.unported/project_milestone_remaining_hours/views/project_milestone.xml deleted file mode 100644 index f9036453..00000000 --- a/.unported/project_milestone_remaining_hours/views/project_milestone.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - Project Milestone Remaining Hours List - project.milestone - - - - - - - - - - - - project.milestone.remaining.hours.form - project.milestone - - - - - - - - - - \ No newline at end of file diff --git a/.unported/project_milestone_remaining_hours/views/project_project.xml b/.unported/project_milestone_remaining_hours/views/project_project.xml deleted file mode 100644 index b6d9a409..00000000 --- a/.unported/project_milestone_remaining_hours/views/project_project.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - Project Milestone Remaining Hours Form - project.project - - form - - - - - - - - diff --git a/.unported/project_milestone_responsible/README.rst b/.unported/project_milestone_responsible/README.rst deleted file mode 100644 index 0b9eda81..00000000 --- a/.unported/project_milestone_responsible/README.rst +++ /dev/null @@ -1,13 +0,0 @@ -Project Milestone Responsible -============================= -This module allows you to assign a ``Responsible`` for a Project's Milestone. - -.. image:: static/description/milestone_responsible.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_milestone_responsible/__init__.py b/.unported/project_milestone_responsible/__init__.py deleted file mode 100644 index dca48a74..00000000 --- a/.unported/project_milestone_responsible/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models \ No newline at end of file diff --git a/.unported/project_milestone_responsible/__manifest__.py b/.unported/project_milestone_responsible/__manifest__.py deleted file mode 100644 index c5364627..00000000 --- a/.unported/project_milestone_responsible/__manifest__.py +++ /dev/null @@ -1,20 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Milestone Responsible', - 'version': '1.0.0', - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - 'summary': "Assign a responsible for a project's milestone", - 'depends': [ - 'project_milestone' - ], - 'data': [ - 'views/project_milestone.xml', - ], - 'installable': True, -} diff --git a/.unported/project_milestone_responsible/i18n/fr.po b/.unported/project_milestone_responsible/i18n/fr.po deleted file mode 100644 index 32da72a7..00000000 --- a/.unported/project_milestone_responsible/i18n/fr.po +++ /dev/null @@ -1,27 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# *project_role_milestone -# -# Translators: -# Abdellatif Benzbiria ,2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-30\n" -"PO-Revision-Date: 2022-08-30\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_responsible -#: model:ir.model.fields,field_description:project_milestone_responsible.field_project_milestone__user_id -#: model_terms:ir.ui.view,arch_db:project_milestone_responsible.project_milestone_view_search -msgid "Responsible" -msgstr "Responsable" - diff --git a/.unported/project_milestone_responsible/models/__init__.py b/.unported/project_milestone_responsible/models/__init__.py deleted file mode 100644 index ebecf304..00000000 --- a/.unported/project_milestone_responsible/models/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_milestone - diff --git a/.unported/project_milestone_responsible/models/project_milestone.py b/.unported/project_milestone_responsible/models/project_milestone.py deleted file mode 100644 index 4ae554e8..00000000 --- a/.unported/project_milestone_responsible/models/project_milestone.py +++ /dev/null @@ -1,15 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import models, fields - - -class ProjectMilestone(models.Model): - - _inherit = "project.milestone" - - user_id = fields.Many2one( - "res.users", - "Responsible", - domain= [('share', '=', False)], - help="Assign a responsible by choosing an Internal user" - ) diff --git a/.unported/project_milestone_responsible/static/description/icon.png b/.unported/project_milestone_responsible/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_responsible/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_responsible/static/description/milestone_responsible.png b/.unported/project_milestone_responsible/static/description/milestone_responsible.png deleted file mode 100644 index 4dacb8a4..00000000 Binary files a/.unported/project_milestone_responsible/static/description/milestone_responsible.png and /dev/null differ diff --git a/.unported/project_milestone_responsible/views/project_milestone.xml b/.unported/project_milestone_responsible/views/project_milestone.xml deleted file mode 100644 index fbfe17d4..00000000 --- a/.unported/project_milestone_responsible/views/project_milestone.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - project.milestone.form - project.milestone - - - - - - - - - - project.milestone.search - project.milestone - - - - - - - - - - - - - project.milestone.form - project.project - - - - {'default_project_id': active_id, 'default_user_id':user_id} - - - - - \ No newline at end of file diff --git a/.unported/project_milestone_start_date/README.rst b/.unported/project_milestone_start_date/README.rst deleted file mode 100644 index 4ff9d939..00000000 --- a/.unported/project_milestone_start_date/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -Project Milestone Start date -============================ - -.. contents:: Table of Contents - -Description ------------ -This module adds a Start Date field to milestone object. - -Overview --------- -I open the form view of a milestone, a new field is added ``Start Date``. - -.. image:: static/description/field_date_start_form_view.png - -The same field is added to the list view of a milestone. - -.. image:: static/description/field_date_start_list_view.png - -From a project form view with ``Use Milestone`` egal a True, I see the field ``Start Date`` added to Milestones Tab lines. - -.. image:: static/description/field_date_start_milestone_project_form.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com \ No newline at end of file diff --git a/.unported/project_milestone_start_date/__init__.py b/.unported/project_milestone_start_date/__init__.py deleted file mode 100644 index 9e9bc013..00000000 --- a/.unported/project_milestone_start_date/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_milestone_start_date/__manifest__.py b/.unported/project_milestone_start_date/__manifest__.py deleted file mode 100644 index 6f51fd19..00000000 --- a/.unported/project_milestone_start_date/__manifest__.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Milestone Start Date", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Add start date field to Milestones", - "depends": ["project_milestone"], - "data": [ - "views/project.xml", - "views/project_milestone.xml", - ], - "installable": True, -} diff --git a/.unported/project_milestone_start_date/i18n/fr.po b/.unported/project_milestone_start_date/i18n/fr.po deleted file mode 100644 index a1c3ea1d..00000000 --- a/.unported/project_milestone_start_date/i18n/fr.po +++ /dev/null @@ -1,27 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_milestone_start_date -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-29 10:52+0000\n" -"PO-Revision-Date: 2022-08-29 10:52+0000\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_start_date -#: model:ir.model,name:project_milestone_start_date.model_project_milestone -msgid "Project Milestone" -msgstr "Jalon du projet" - -#. module: project_milestone_start_date -#: model:ir.model.fields,field_description:project_milestone_start_date.field_project_milestone__start_date -msgid "Start Date" -msgstr "Date de début" - diff --git a/.unported/project_milestone_start_date/models/__init__.py b/.unported/project_milestone_start_date/models/__init__.py deleted file mode 100644 index 94d69f2c..00000000 --- a/.unported/project_milestone_start_date/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_milestone diff --git a/.unported/project_milestone_start_date/models/project_milestone.py b/.unported/project_milestone_start_date/models/project_milestone.py deleted file mode 100644 index 44fd9bbf..00000000 --- a/.unported/project_milestone_start_date/models/project_milestone.py +++ /dev/null @@ -1,11 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProjectMilestone(models.Model): - - _inherit = "project.milestone" - - start_date = fields.Date(string="Start Date") diff --git a/.unported/project_milestone_start_date/static/description/field_date_start_form_view.png b/.unported/project_milestone_start_date/static/description/field_date_start_form_view.png deleted file mode 100644 index 8b1df17e..00000000 Binary files a/.unported/project_milestone_start_date/static/description/field_date_start_form_view.png and /dev/null differ diff --git a/.unported/project_milestone_start_date/static/description/field_date_start_list_view.png b/.unported/project_milestone_start_date/static/description/field_date_start_list_view.png deleted file mode 100644 index 9d182554..00000000 Binary files a/.unported/project_milestone_start_date/static/description/field_date_start_list_view.png and /dev/null differ diff --git a/.unported/project_milestone_start_date/static/description/field_date_start_milestone_project_form.png b/.unported/project_milestone_start_date/static/description/field_date_start_milestone_project_form.png deleted file mode 100644 index 29d8af82..00000000 Binary files a/.unported/project_milestone_start_date/static/description/field_date_start_milestone_project_form.png and /dev/null differ diff --git a/.unported/project_milestone_start_date/static/description/icon.png b/.unported/project_milestone_start_date/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_start_date/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_start_date/views/project.xml b/.unported/project_milestone_start_date/views/project.xml deleted file mode 100644 index 53ea47ec..00000000 --- a/.unported/project_milestone_start_date/views/project.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - Project Milestones Add Start Date Form - project.project - - - - - - - - - diff --git a/.unported/project_milestone_start_date/views/project_milestone.xml b/.unported/project_milestone_start_date/views/project_milestone.xml deleted file mode 100644 index fe8474b4..00000000 --- a/.unported/project_milestone_start_date/views/project_milestone.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - Project Milestone Form: Add Start Date - project.milestone - - - - - - - - - - - Project Milestone List: Add Start Date - project.milestone - - - - - - - - - diff --git a/.unported/project_milestone_timeline/README.rst b/.unported/project_milestone_timeline/README.rst deleted file mode 100644 index 4349ee55..00000000 --- a/.unported/project_milestone_timeline/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -Project Milestone Timeline -========================== - -This module adds a ``Timeline View`` to Project Milestones. - - -.. contents:: Table of Contents - -Context -------- -This module is base on the OCA module `web_timeline `__ - -The module `project_milestone_start_date `_ -allows to define a ``Start Date`` for a Project Milestone. - -Overview --------- -As a member of the group ``Projects/ Manager``, I go to Project > Configuration > All Milestones. - -I see that a ``Timeline View`` of the milestones is available. - -.. image:: static/description/Milestone_timeline_view.png - -* When I select this view, I see that the milestones are grouped by project and that they are displayed on the timeline according to the ``Start Date`` and ``End Date`` of the milestone. - -.. image:: static/description/Timeline_milestone_grouped_by_projects.png - -* When I click on one of the milestones in the Timeline View, I can move it by ``Drag & Drop``. - - ** This action updates the ``Start Date`` and ``End Date`` on the milestone. - -* When I double click on the milestone from the Timeline View, the milestone Form View opens in ``edit`` mode. - -.. image:: static/description/Milestone_timeline_view.png - - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_milestone_timeline/__init__.py b/.unported/project_milestone_timeline/__init__.py deleted file mode 100644 index bba08aa0..00000000 --- a/.unported/project_milestone_timeline/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - diff --git a/.unported/project_milestone_timeline/__manifest__.py b/.unported/project_milestone_timeline/__manifest__.py deleted file mode 100644 index af3bada6..00000000 --- a/.unported/project_milestone_timeline/__manifest__.py +++ /dev/null @@ -1,21 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Milestone Timeline", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Add Timeline View to Project Milestone", - "depends": [ - "project_milestone_start_date", - "web_timeline", - ], - "data": [ - "views/project_milestone.xml", - ], - "installable": True, -} diff --git a/.unported/project_milestone_timeline/i18n/fr.po b/.unported/project_milestone_timeline/i18n/fr.po deleted file mode 100644 index 9a6ef4a0..00000000 --- a/.unported/project_milestone_timeline/i18n/fr.po +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-05 20:04+0000\n" -"PO-Revision-Date: 2022-09-05 20:04+0000\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" - diff --git a/.unported/project_milestone_timeline/static/description/Milestone_timeline_view.png b/.unported/project_milestone_timeline/static/description/Milestone_timeline_view.png deleted file mode 100644 index f1312a3a..00000000 Binary files a/.unported/project_milestone_timeline/static/description/Milestone_timeline_view.png and /dev/null differ diff --git a/.unported/project_milestone_timeline/static/description/Timeline_milestone_grouped_by_projects.png b/.unported/project_milestone_timeline/static/description/Timeline_milestone_grouped_by_projects.png deleted file mode 100644 index a0acfd96..00000000 Binary files a/.unported/project_milestone_timeline/static/description/Timeline_milestone_grouped_by_projects.png and /dev/null differ diff --git a/.unported/project_milestone_timeline/static/description/Timeline_milestone_popup.png b/.unported/project_milestone_timeline/static/description/Timeline_milestone_popup.png deleted file mode 100644 index 85020d90..00000000 Binary files a/.unported/project_milestone_timeline/static/description/Timeline_milestone_popup.png and /dev/null differ diff --git a/.unported/project_milestone_timeline/static/description/icon.png b/.unported/project_milestone_timeline/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_timeline/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_timeline/views/project_milestone.xml b/.unported/project_milestone_timeline/views/project_milestone.xml deleted file mode 100644 index c42e1b3b..00000000 --- a/.unported/project_milestone_timeline/views/project_milestone.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - project.milestone - timeline - - - - - - tree,form,timeline - - - diff --git a/.unported/project_milestone_timeline_color/README.rst b/.unported/project_milestone_timeline_color/README.rst deleted file mode 100644 index 770bf67e..00000000 --- a/.unported/project_milestone_timeline_color/README.rst +++ /dev/null @@ -1,53 +0,0 @@ -Project Milestone Timeline Color -================================ - -This module displays milestones in the color assigned to the milestone type. - -.. contents:: Table of Contents - -Context -------- -The module `project_milestone_type `_ -allows to define ``Types`` for a Project Milestone. - - -Configuration --------- -As a member of the group ``Projects / Manager``, I go to the Form View of Milestone Types. - -I see that a new ``HTML Color`` field is available and that it has the following default value : ``#FFFFFF``. - -.. image:: static/description/field_html_color_form_view.png - -When I click in the field, I see that I can select a color thanks to the ``Widget Color``. - -.. image:: static/description/widget_color.png - -From the Milestone Types List View, I see that the new ``HTML Color`` field is available and that a preview of the color is also displayed. - -.. image:: static/description/field_html_color_list_view.png - - -Usage --------- - -As a user who can view milestones, I go to the Milestones Timeline View. - -I see that the milestones are displayed in the color assigned to the type of the milestone. - -.. image:: static/description/milestones_timeline_colors.png - - -If `no color is defined` on the type of milestone associated to the milestone, -the milestone is displayed in white (#FFFFFF) in the ``Timeline View``. - -In case `the milestone is not associated with a milestone type` or if `the milestone is associated with an inactive milestone type`, -the milestone is displayed in white (#FFFFFF) in the ``Timeline View``. - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_milestone_timeline_color/__init__.py b/.unported/project_milestone_timeline_color/__init__.py deleted file mode 100644 index 9e9bc013..00000000 --- a/.unported/project_milestone_timeline_color/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_milestone_timeline_color/__manifest__.py b/.unported/project_milestone_timeline_color/__manifest__.py deleted file mode 100644 index 5f3533cc..00000000 --- a/.unported/project_milestone_timeline_color/__manifest__.py +++ /dev/null @@ -1,23 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Milestone Timeline Color", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Display milestones in the color assigned to the milestone type", - "depends": [ - "project_milestone_type", - "project_milestone_timeline", - "web_widget_color", - ], - "data": [ - "views/project_milestone_type.xml", - "views/project_milestone.xml", - ], - "installable": True, -} diff --git a/.unported/project_milestone_timeline_color/i18n/fr.po b/.unported/project_milestone_timeline_color/i18n/fr.po deleted file mode 100644 index 8ebbc0f4..00000000 --- a/.unported/project_milestone_timeline_color/i18n/fr.po +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_milestone_timeline_color -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-05 21:55+0000\n" -"PO-Revision-Date: 2022-09-05 21:55+0000\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_timeline_color -#: model_terms:ir.ui.view,arch_db:project_milestone_timeline_color.project_milestone_type_color_view_form -msgid "#FF0000" -msgstr "" - -#. module: project_milestone_timeline_color -#: model:ir.model.fields,field_description:project_milestone_timeline_color.field_project_milestone__color -msgid "Color" -msgstr "Couleur" - -#. module: project_milestone_timeline_color -#: model:ir.model.fields,field_description:project_milestone_timeline_color.field_project_milestone_type__html_color -msgid "HTML Color" -msgstr "Couleur HTML" - -#. module: project_milestone_timeline_color -#: model:ir.model,name:project_milestone_timeline_color.model_project_milestone_type -msgid "Milestone Types" -msgstr "Types de jalon" - -#. module: project_milestone_timeline_color -#: model:ir.model,name:project_milestone_timeline_color.model_project_milestone -msgid "Project Milestone" -msgstr "Jalon du projet" - -#. module: project_milestone_timeline_color -#: model:ir.model.fields,help:project_milestone_timeline_color.field_project_milestone_type__html_color -msgid "You can define a specific HTML color index (e.g. #FF0000) that will be applied to Milestones of this Type in the Timeline view." -msgstr "Vous pouvez définir un index de couleur HTML spécifique (e.g. #FF0000) qui sera appliqué aux jalons de ce type dans la vue Timeline." - diff --git a/.unported/project_milestone_timeline_color/models/__init__.py b/.unported/project_milestone_timeline_color/models/__init__.py deleted file mode 100644 index eba5cb9f..00000000 --- a/.unported/project_milestone_timeline_color/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import (project_milestone_type, project_milestone) diff --git a/.unported/project_milestone_timeline_color/models/project_milestone.py b/.unported/project_milestone_timeline_color/models/project_milestone.py deleted file mode 100644 index 905db73b..00000000 --- a/.unported/project_milestone_timeline_color/models/project_milestone.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProjectMilestone(models.Model): - _inherit = "project.milestone" - - color = fields.Char("Color", compute="_compute_milestone_color") - - def _compute_milestone_color(self): - for record in self: - color = '#FFFFFF' - if record.type_id and record.type_id.html_color \ - and record.type_id.active: - color = record.type_id.html_color - record.color = color diff --git a/.unported/project_milestone_timeline_color/models/project_milestone_type.py b/.unported/project_milestone_timeline_color/models/project_milestone_type.py deleted file mode 100644 index d86d3ff6..00000000 --- a/.unported/project_milestone_timeline_color/models/project_milestone_type.py +++ /dev/null @@ -1,15 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProjectMilestoneType(models.Model): - _inherit = "project.milestone.type" - - html_color = fields.Char( - string="HTML Color", - default="#FFFFFF", - help="You can define a specific HTML color index (e.g. #FF0000) that " - "will be applied to Milestones of this Type in the Timeline view." - ) diff --git a/.unported/project_milestone_timeline_color/static/description/field_html_color_form_view.png b/.unported/project_milestone_timeline_color/static/description/field_html_color_form_view.png deleted file mode 100644 index 3425e5dd..00000000 Binary files a/.unported/project_milestone_timeline_color/static/description/field_html_color_form_view.png and /dev/null differ diff --git a/.unported/project_milestone_timeline_color/static/description/field_html_color_list_view.png b/.unported/project_milestone_timeline_color/static/description/field_html_color_list_view.png deleted file mode 100644 index c7c1a006..00000000 Binary files a/.unported/project_milestone_timeline_color/static/description/field_html_color_list_view.png and /dev/null differ diff --git a/.unported/project_milestone_timeline_color/static/description/icon.png b/.unported/project_milestone_timeline_color/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_timeline_color/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_timeline_color/static/description/milestones_timeline_colors.png b/.unported/project_milestone_timeline_color/static/description/milestones_timeline_colors.png deleted file mode 100644 index 40ebfda6..00000000 Binary files a/.unported/project_milestone_timeline_color/static/description/milestones_timeline_colors.png and /dev/null differ diff --git a/.unported/project_milestone_timeline_color/static/description/widget_color.png b/.unported/project_milestone_timeline_color/static/description/widget_color.png deleted file mode 100644 index dd2bdfb4..00000000 Binary files a/.unported/project_milestone_timeline_color/static/description/widget_color.png and /dev/null differ diff --git a/.unported/project_milestone_timeline_color/views/project_milestone.xml b/.unported/project_milestone_timeline_color/views/project_milestone.xml deleted file mode 100644 index e92125ca..00000000 --- a/.unported/project_milestone_timeline_color/views/project_milestone.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - project.milestone - - timeline - - - color - - - - - diff --git a/.unported/project_milestone_timeline_color/views/project_milestone_type.xml b/.unported/project_milestone_timeline_color/views/project_milestone_type.xml deleted file mode 100644 index 60cb5bb4..00000000 --- a/.unported/project_milestone_timeline_color/views/project_milestone_type.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - Project Milestone Types Form: Add HTML Color - project.milestone.type - - - - - - - - - - - Project Milestone Types Tree: Add HTML Color - project.milestone.type - - - - - - - - - diff --git a/.unported/project_milestone_type/README.rst b/.unported/project_milestone_type/README.rst deleted file mode 100644 index 11327262..00000000 --- a/.unported/project_milestone_type/README.rst +++ /dev/null @@ -1,39 +0,0 @@ -Project Milestone Types -======================= - -.. contents:: Table of Contents - -Description ------------ -This module adds ``Types`` to Project Milestones. - -Overview --------- -As a member of the group ``Projects / Manager``, I go to Project > Configuration. - -I notice that a new section ``Milestones`` is available and that it contains the new menu ``Milestone Types`` with the existing menu ``All Milestones``. - -.. image:: static/description/Milestones_menus.png - -I click on the menu ``Milestone Types``. The list view of Milestone Types is displayed. - -.. image:: static/description/Milestone_types_list_view.png - -I click on the ``Create`` button. The Milestone Types form view is displayed. - -.. image:: static/description/Milestone_types_form_view.png - -I click on the menu ``All Milestones``, then I click on a Milestone line. - -I see that the new field ``Type`` is available in the Milestone form view. - -.. image:: static/description/Milestone_form_view.png - - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_milestone_type/__init__.py b/.unported/project_milestone_type/__init__.py deleted file mode 100644 index 9e9bc013..00000000 --- a/.unported/project_milestone_type/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_milestone_type/__manifest__.py b/.unported/project_milestone_type/__manifest__.py deleted file mode 100644 index 40d74cd0..00000000 --- a/.unported/project_milestone_type/__manifest__.py +++ /dev/null @@ -1,20 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Milestone Type", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Milestone Types", - "depends": ["project_milestone"], - "data": [ - "security/ir.model.access.csv", - "views/project_milestone_type.xml", - "views/project_milestone.xml", - ], - "installable": True, -} diff --git a/.unported/project_milestone_type/i18n/fr.po b/.unported/project_milestone_type/i18n/fr.po deleted file mode 100644 index f1f8f5c0..00000000 --- a/.unported/project_milestone_type/i18n/fr.po +++ /dev/null @@ -1,110 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_milestone_type -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-02 15:04+0000\n" -"PO-Revision-Date: 2022-09-02 15:04+0000\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_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__active -msgid "Active" -msgstr "Actif" - -#. module: project_milestone_type -#: model_terms:ir.ui.view,arch_db:project_milestone_type.project_milestone_type_view_form -msgid "Add a description..." -msgstr "Ajouter une description…" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__create_uid -msgid "Created by" -msgstr "Créé par" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__create_date -msgid "Created on" -msgstr "Créé le" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__description -#: model_terms:ir.ui.view,arch_db:project_milestone_type.project_milestone_type_view_form -msgid "Description" -msgstr "Description" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__display_name -msgid "Display Name" -msgstr "Afficher Nom" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__id -msgid "ID" -msgstr "ID" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type____last_update -msgid "Last Modified on" -msgstr "Dernière modification le" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__write_uid -msgid "Last Updated by" -msgstr "Dernière mise à jour par" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__write_date -msgid "Last Updated on" -msgstr "Dernière mise à jour le" - -#. module: project_milestone_type -#: model:ir.actions.act_window,name:project_milestone_type.project_milestone_type_action -#: model:ir.model,name:project_milestone_type.model_project_milestone_type -#: model:ir.ui.menu,name:project_milestone_type.milestone_type_menu -msgid "Milestone Types" -msgstr "Types de jalon" - -#. module: project_milestone_type -#: model_terms:ir.ui.view,arch_db:project_milestone_type.project_milestone_type_view_form -#: model_terms:ir.ui.view,arch_db:project_milestone_type.project_milestone_type_view_tree -msgid "Milestone type" -msgstr "Type de jalon" - -#. module: project_milestone_type -#: model:ir.ui.menu,name:project_milestone_type.milestones_menu -msgid "Milestones" -msgstr "Jalons" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone_type__name -msgid "Name" -msgstr "Nom" - -#. module: project_milestone_type -#: model_terms:ir.actions.act_window,help:project_milestone_type.project_milestone_type_action -msgid "No milestone types records found" -msgstr "Aucun type de jalon trouvé" - -#. module: project_milestone_type -#: model:ir.model,name:project_milestone_type.model_project_milestone -msgid "Project Milestone" -msgstr "Jalon du projet" - -#. module: project_milestone_type -#: model_terms:ir.actions.act_window,help:project_milestone_type.project_milestone_type_action -msgid "The milestone types records will be displayed here." -msgstr "Les types de jalon seront affichés ici" - -#. module: project_milestone_type -#: model:ir.model.fields,field_description:project_milestone_type.field_project_milestone__type_id -msgid "Type" -msgstr "Type" diff --git a/.unported/project_milestone_type/models/__init__.py b/.unported/project_milestone_type/models/__init__.py deleted file mode 100644 index eba5cb9f..00000000 --- a/.unported/project_milestone_type/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import (project_milestone_type, project_milestone) diff --git a/.unported/project_milestone_type/models/project_milestone.py b/.unported/project_milestone_type/models/project_milestone.py deleted file mode 100644 index 8139dc00..00000000 --- a/.unported/project_milestone_type/models/project_milestone.py +++ /dev/null @@ -1,10 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProjectMilestone(models.Model): - _inherit = "project.milestone" - - type_id = fields.Many2one('project.milestone.type', 'Type') diff --git a/.unported/project_milestone_type/models/project_milestone_type.py b/.unported/project_milestone_type/models/project_milestone_type.py deleted file mode 100644 index 86717acc..00000000 --- a/.unported/project_milestone_type/models/project_milestone_type.py +++ /dev/null @@ -1,14 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProjectMilestoneType(models.Model): - _name = "project.milestone.type" - _description = "Milestone Types" - - name = fields.Char('Name', required=True) - description = fields.Char('Description') - active = fields.Boolean('Active', default=True) - diff --git a/.unported/project_milestone_type/security/ir.model.access.csv b/.unported/project_milestone_type/security/ir.model.access.csv deleted file mode 100644 index 35eaf4c6..00000000 --- a/.unported/project_milestone_type/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_project_milestone_type_user,access_project_milestone_type_user,model_project_milestone_type,project.group_project_user,1,0,0,0 -access_project_milestone_type_manager,access_project_milestone_type_manager,model_project_milestone_type,project.group_project_manager,1,1,1,1 diff --git a/.unported/project_milestone_type/static/description/Milestone_form_view.png b/.unported/project_milestone_type/static/description/Milestone_form_view.png deleted file mode 100644 index 1f144848..00000000 Binary files a/.unported/project_milestone_type/static/description/Milestone_form_view.png and /dev/null differ diff --git a/.unported/project_milestone_type/static/description/Milestone_types_form_view.png b/.unported/project_milestone_type/static/description/Milestone_types_form_view.png deleted file mode 100644 index c56c440d..00000000 Binary files a/.unported/project_milestone_type/static/description/Milestone_types_form_view.png and /dev/null differ diff --git a/.unported/project_milestone_type/static/description/Milestone_types_list_view.png b/.unported/project_milestone_type/static/description/Milestone_types_list_view.png deleted file mode 100644 index c162cc6b..00000000 Binary files a/.unported/project_milestone_type/static/description/Milestone_types_list_view.png and /dev/null differ diff --git a/.unported/project_milestone_type/static/description/Milestones_menus.png b/.unported/project_milestone_type/static/description/Milestones_menus.png deleted file mode 100644 index 414cfd82..00000000 Binary files a/.unported/project_milestone_type/static/description/Milestones_menus.png and /dev/null differ diff --git a/.unported/project_milestone_type/static/description/icon.png b/.unported/project_milestone_type/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_type/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_type/views/project_milestone.xml b/.unported/project_milestone_type/views/project_milestone.xml deleted file mode 100644 index 38c242f5..00000000 --- a/.unported/project_milestone_type/views/project_milestone.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - Project Milestone Form: Add Type - project.milestone - - - - - - - - - - - Project Milestone List: Add Start Date - project.milestone - - - - - - - - - - - - - - diff --git a/.unported/project_milestone_type/views/project_milestone_type.xml b/.unported/project_milestone_type/views/project_milestone_type.xml deleted file mode 100644 index 9e14a804..00000000 --- a/.unported/project_milestone_type/views/project_milestone_type.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - Project Milestone Types Form - project.milestone.type - -
- - - - - - - - - - - -
-
-
- - - - Project Milestone Types Tree - project.milestone.type - - - - - - - - - - - Milestone Types - project.milestone.type - form - tree,form - {} - -

- No milestone types records found -

- The milestone types records will be displayed here. -

-
-
- - - - - - -
diff --git a/.unported/project_milestone_week_duration/README.rst b/.unported/project_milestone_week_duration/README.rst deleted file mode 100644 index b12478b3..00000000 --- a/.unported/project_milestone_week_duration/README.rst +++ /dev/null @@ -1,58 +0,0 @@ -Project Milestone Week Duration -=============================== - -.. contents:: Table of Contents - -Description ------------ -This module adds a ``Duration`` field to the Project Milestones. - -It changes the ``Target Date`` field to ``End Date`` field calculated automatically by ``Start Date`` and ``Duration`` - -Context ----------- -The module `project_milestone_start_date `_ -allows to define a ``Start Date`` for a Project Milestone. - -Overview --------- -As a user who can manage Milestones, I open the Form View of a Milestone. - -I notice the new field ``Duration``. - -.. image:: static/description/field_duration_form_view.png - -The same field is added to the list view of a Milestone. - -.. image:: static/description/field_duration_list_view.png - -Project Form View ---------- - -From a Project Form View with ``Use Milestone`` activated, I see that the new field ``Duration`` is displayed in the Milestones Tab Lines. - -.. image:: static/description/field_duration_milestone_project_form.png - -Target Date / End Date ----------- - -From the Milestone Form View, I notice that the ``Target Date`` is now named ``End Date`` and that it is now ``Readonly``. - -The field is calculated automatically by the system as following : - -1- Select a ``Start Date``; - -2- Add a ``Duration`` (number of weeks); - -3- The ``End Date`` is calculated automatically. - -.. image:: static/description/field_duration_calculation.png - - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_milestone_week_duration/__init__.py b/.unported/project_milestone_week_duration/__init__.py deleted file mode 100644 index 9e9bc013..00000000 --- a/.unported/project_milestone_week_duration/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_milestone_week_duration/__manifest__.py b/.unported/project_milestone_week_duration/__manifest__.py deleted file mode 100644 index a60ef176..00000000 --- a/.unported/project_milestone_week_duration/__manifest__.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Milestone Week Duration", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Calculate Milestone Automatically from Start Date and Duration", - "depends": ["project_milestone_start_date"], - "data": [ - "views/project.xml", - "views/project_milestone.xml", - ], - "installable": True, -} diff --git a/.unported/project_milestone_week_duration/i18n/fr.po b/.unported/project_milestone_week_duration/i18n/fr.po deleted file mode 100644 index daba964b..00000000 --- a/.unported/project_milestone_week_duration/i18n/fr.po +++ /dev/null @@ -1,54 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_milestone_week_duration -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-19 15:32+0000\n" -"PO-Revision-Date: 2022-09-19 15:32+0000\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_week_duration -#: model_terms:ir.ui.view,arch_db:project_milestone_week_duration.project_milestone_duration_view_form -msgid " week(s)" -msgstr " semaine(s)" - -#. module: project_milestone_week_duration -#: model:ir.model.fields,field_description:project_milestone_week_duration.field_project_milestone__duration -#: model_terms:ir.ui.view,arch_db:project_milestone_week_duration.project_milestone_duration_view_form -msgid "Duration" -msgstr "Durée" - -#. module: project_milestone_week_duration -#: model_terms:ir.ui.view,arch_db:project_milestone_week_duration.project_milestone_duration_view_list -#: model_terms:ir.ui.view,arch_db:project_milestone_week_duration.project_milestones_duration_view_form -msgid "Duration (week(s))" -msgstr "Durée (semaine(s))" - -#. module: project_milestone_week_duration -#: model:ir.model.fields,field_description:project_milestone_week_duration.field_project_milestone__target_date -msgid "End Date" -msgstr "Date de fin" - -#. module: project_milestone_week_duration -#: model:ir.model.fields,help:project_milestone_week_duration.field_project_milestone__duration -msgid "Indicates the duration of the milestone in calendar weeks (7 days)" -msgstr "Indique la durée du jalon en semaines calendaires (7 jours)." - -#. module: project_milestone_week_duration -#: model:ir.model,name:project_milestone_week_duration.model_project_milestone -msgid "Project Milestone" -msgstr "Jalon du projet" - -#. module: project_milestone_week_duration -#: model:ir.model.fields,help:project_milestone_week_duration.field_project_milestone__target_date -msgid "The date when the Milestone should be complete." -msgstr "La date à laquelle le jalon doit être terminé." - diff --git a/.unported/project_milestone_week_duration/models/__init__.py b/.unported/project_milestone_week_duration/models/__init__.py deleted file mode 100644 index 94d69f2c..00000000 --- a/.unported/project_milestone_week_duration/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_milestone diff --git a/.unported/project_milestone_week_duration/models/project_milestone.py b/.unported/project_milestone_week_duration/models/project_milestone.py deleted file mode 100644 index 30490e19..00000000 --- a/.unported/project_milestone_week_duration/models/project_milestone.py +++ /dev/null @@ -1,28 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields, api -from dateutil.relativedelta import relativedelta - - -class ProjectMilestone(models.Model): - - _inherit = "project.milestone" - - duration = fields.Float( - string="Duration", - help="Indicates the duration of the milestone in calendar weeks (7 days)", - ) - target_date = fields.Date( - string="End Date", - readonly=True, - ) - - @api.onchange("start_date", "duration") - def onchange_date_start_duration(self): - for record in self: - if record.start_date and record.duration: - record.target_date = record.start_date + \ - relativedelta(weeks=record.duration) - else: - record.target_date = False diff --git a/.unported/project_milestone_week_duration/static/description/field_duration_calculation.png b/.unported/project_milestone_week_duration/static/description/field_duration_calculation.png deleted file mode 100644 index 76317833..00000000 Binary files a/.unported/project_milestone_week_duration/static/description/field_duration_calculation.png and /dev/null differ diff --git a/.unported/project_milestone_week_duration/static/description/field_duration_form_view.png b/.unported/project_milestone_week_duration/static/description/field_duration_form_view.png deleted file mode 100644 index c7472222..00000000 Binary files a/.unported/project_milestone_week_duration/static/description/field_duration_form_view.png and /dev/null differ diff --git a/.unported/project_milestone_week_duration/static/description/field_duration_list_view.png b/.unported/project_milestone_week_duration/static/description/field_duration_list_view.png deleted file mode 100644 index bd72534f..00000000 Binary files a/.unported/project_milestone_week_duration/static/description/field_duration_list_view.png and /dev/null differ diff --git a/.unported/project_milestone_week_duration/static/description/field_duration_milestone_project_form.png b/.unported/project_milestone_week_duration/static/description/field_duration_milestone_project_form.png deleted file mode 100644 index 80d0a067..00000000 Binary files a/.unported/project_milestone_week_duration/static/description/field_duration_milestone_project_form.png and /dev/null differ diff --git a/.unported/project_milestone_week_duration/static/description/icon.png b/.unported/project_milestone_week_duration/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_milestone_week_duration/static/description/icon.png and /dev/null differ diff --git a/.unported/project_milestone_week_duration/tests/__init__.py b/.unported/project_milestone_week_duration/tests/__init__.py deleted file mode 100644 index 835c96ce..00000000 --- a/.unported/project_milestone_week_duration/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import test_project_milestone_end_date_calculation diff --git a/.unported/project_milestone_week_duration/tests/test_project_milestone_end_date_calculation.py b/.unported/project_milestone_week_duration/tests/test_project_milestone_end_date_calculation.py deleted file mode 100644 index b2f67b0c..00000000 --- a/.unported/project_milestone_week_duration/tests/test_project_milestone_end_date_calculation.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.tests.common import SavepointCase -from odoo import fields - - -class TestProjectMilestoneTimeKPI(SavepointCase): - - def test_project_milestone_end_date_calculation(self): - milestone = self.env['project.milestone'].create({ - "name": "Test End Date Calculation", - "start_date": fields.Date.from_string("2022-08-01"), - "duration": 4.5, - }) - milestone.onchange_date_start_duration() - assert milestone.target_date == fields.Date.from_string("2022-09-01") - diff --git a/.unported/project_milestone_week_duration/views/project.xml b/.unported/project_milestone_week_duration/views/project.xml deleted file mode 100644 index d7d33534..00000000 --- a/.unported/project_milestone_week_duration/views/project.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - Project Milestones Add Duration Form - project.project - - - - - - - - - diff --git a/.unported/project_milestone_week_duration/views/project_milestone.xml b/.unported/project_milestone_week_duration/views/project_milestone.xml deleted file mode 100644 index 476327ad..00000000 --- a/.unported/project_milestone_week_duration/views/project_milestone.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - Project Milestone Form: Add Duration - project.milestone - - - - - - - - - Project Milestone Form: Force Save Target Date - project.milestone - - - - 1 - - - - - - - Project Milestone List: Add Duration - project.milestone - - - - - - - - - diff --git a/.unported/project_portal_no_subtask/README.rst b/.unported/project_portal_no_subtask/README.rst deleted file mode 100644 index 29310544..00000000 --- a/.unported/project_portal_no_subtask/README.rst +++ /dev/null @@ -1,13 +0,0 @@ -Project Portal No Subtask -========================= -This hides subtasks from the portal list of tasks. - -.. image:: static/description/portal_task_list.png - -Also, the count of task on the portal home excludes the number of subtasks. - -.. image:: static/description/portal_task_count.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_portal_no_subtask/__init__.py b/.unported/project_portal_no_subtask/__init__.py deleted file mode 100644 index e639edd8..00000000 --- a/.unported/project_portal_no_subtask/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models, controller diff --git a/.unported/project_portal_no_subtask/__manifest__.py b/.unported/project_portal_no_subtask/__manifest__.py deleted file mode 100644 index 10b56984..00000000 --- a/.unported/project_portal_no_subtask/__manifest__.py +++ /dev/null @@ -1,14 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Portal No Subtask", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "depends": ["project"], - "installable": True, -} diff --git a/.unported/project_portal_no_subtask/controller/__init__.py b/.unported/project_portal_no_subtask/controller/__init__.py deleted file mode 100644 index f29ee95a..00000000 --- a/.unported/project_portal_no_subtask/controller/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import portal diff --git a/.unported/project_portal_no_subtask/controller/portal.py b/.unported/project_portal_no_subtask/controller/portal.py deleted file mode 100644 index ba3f0f13..00000000 --- a/.unported/project_portal_no_subtask/controller/portal.py +++ /dev/null @@ -1,49 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.http import route, request -from odoo.tools import frozendict -from odoo.addons.project.controllers.portal import CustomerPortal -from ..models.project_task import NO_DISPLAY_SUBTASKS - - -class CustomerPortal(CustomerPortal): - @route( - ["/my/tasks", "/my/tasks/page/"], - type="http", - auth="user", - website=True, - ) - def portal_my_tasks( - self, - page=1, - date_begin=None, - date_end=None, - sortby=None, - filterby=None, - search=None, - search_in="content", - groupby="project", - **kw - ): - _setup_no_subtasks() - return super().portal_my_tasks( - page=page, - date_begin=date_begin, - date_end=date_end, - sortby=sortby, - filterby=filterby, - search=search, - search_in=search_in, - groupby=groupby, - **kw - ) - - def _prepare_portal_layout_values(self): - _setup_no_subtasks() - return super()._prepare_portal_layout_values() - - -def _setup_no_subtasks(): - new_context = {NO_DISPLAY_SUBTASKS: True} - request.env.context = frozendict(request.env.context, **new_context) diff --git a/.unported/project_portal_no_subtask/i18n/fr.po b/.unported/project_portal_no_subtask/i18n/fr.po deleted file mode 100644 index 08c4e114..00000000 --- a/.unported/project_portal_no_subtask/i18n/fr.po +++ /dev/null @@ -1,23 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_portal_parent_task -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021 - today-10-16 11:38-0400\n" -"PO-Revision-Date: 2021 - today-10-16 11:40-0400\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.0.6\n" - -#. module: project_portal_parent_task -#: model_terms:ir.ui.view,arch_db:project_portal_parent_task.portal_my_task_with_parent_task -msgid "Parent Task:" -msgstr "Tâche parente:" diff --git a/.unported/project_portal_no_subtask/models/__init__.py b/.unported/project_portal_no_subtask/models/__init__.py deleted file mode 100644 index 10c6958f..00000000 --- a/.unported/project_portal_no_subtask/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_task diff --git a/.unported/project_portal_no_subtask/models/project_task.py b/.unported/project_portal_no_subtask/models/project_task.py deleted file mode 100644 index fcf323b3..00000000 --- a/.unported/project_portal_no_subtask/models/project_task.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models -from odoo.osv.expression import AND - -NO_DISPLAY_SUBTASKS = "no_display_subtasks" - - -class ProjectTask(models.Model): - - _inherit = "project.task" - - @api.model - def _where_calc(self, domain, active_test=True): - if self._context.get(NO_DISPLAY_SUBTASKS): - domain = AND([domain or [], [("parent_id", "=", False)]]) - - return super()._where_calc(domain, active_test) diff --git a/.unported/project_portal_no_subtask/static/description/icon.png b/.unported/project_portal_no_subtask/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_portal_no_subtask/static/description/icon.png and /dev/null differ diff --git a/.unported/project_portal_no_subtask/static/description/portal_task_count.png b/.unported/project_portal_no_subtask/static/description/portal_task_count.png deleted file mode 100644 index 650e5fba..00000000 Binary files a/.unported/project_portal_no_subtask/static/description/portal_task_count.png and /dev/null differ diff --git a/.unported/project_portal_no_subtask/static/description/portal_task_list.png b/.unported/project_portal_no_subtask/static/description/portal_task_list.png deleted file mode 100644 index 8f6eb04d..00000000 Binary files a/.unported/project_portal_no_subtask/static/description/portal_task_list.png and /dev/null differ diff --git a/.unported/project_portal_no_subtask/tests/__init__.py b/.unported/project_portal_no_subtask/tests/__init__.py deleted file mode 100644 index 933f1b4b..00000000 --- a/.unported/project_portal_no_subtask/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_portal_no_subtask/tests/test_project_task.py b/.unported/project_portal_no_subtask/tests/test_project_task.py deleted file mode 100644 index d23e4859..00000000 --- a/.unported/project_portal_no_subtask/tests/test_project_task.py +++ /dev/null @@ -1,35 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import pytest -from odoo.exceptions import ValidationError -from odoo.tests import common - - -class TestProjectTask(common.SavepointCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.project = cls.env["project.project"].create({"name": "project A"}) - cls.task = cls.env["project.task"].create( - {"name": "Parent Task", "project_id": cls.project.id} - ) - cls.subtask = cls.env["project.task"].create( - { - "name": "Child Task", - "project_id": cls.project.id, - "parent_id": cls.task.id, - } - ) - - def test_search_without_subtasks(self): - tasks = ( - self.env["project.task"] - .with_context(no_display_subtasks=True) - .search([("project_id", "=", self.project.id)]) - ) - assert tasks == self.task - - def test_search_with_subtasks(self): - tasks = self.env["project.task"].search([("project_id", "=", self.project.id)]) - assert tasks == self.task | self.subtask diff --git a/.unported/project_role_milestone/README.rst b/.unported/project_role_milestone/README.rst deleted file mode 100644 index b7018664..00000000 --- a/.unported/project_role_milestone/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -Project Role Milestone -====================== -This module allows you to define and assign roles to employees involved in projects. - -.. contents:: Table of Contents - -Context -------- -The module `project_milestone `_ lets you define Milestones on Projects. - -The module `project_role `_ allows maintaining project roster based on Roles and Assignments. - -This module allows you to choose a Milestone in the Project's Assignement view - -Overview --------- -As a user with access to Project Assignment, I go to the form view of an Assignment. - -I notice that a new ``Milestone`` field is available. - -.. image:: static/description/assignment_milestone.png - -This field is not required. - -Milestones are filtred by the selected project. - - -Assignments grouped by Milestone -------------------------- - -From the Assignments list view , the user can group by Milestones. - -.. image:: static/description/assignments_by_milsetone.png - - -Milestone's Assignments -------------------------- -As a user with access to Milestone form view , I can display all the assignements linked to the selected milestone. - -.. image:: static/description/milestone_assignements.png - - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_role_milestone/__init__.py b/.unported/project_role_milestone/__init__.py deleted file mode 100644 index 233f44d9..00000000 --- a/.unported/project_role_milestone/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models -from .init_hook import post_init_hook \ No newline at end of file diff --git a/.unported/project_role_milestone/__manifest__.py b/.unported/project_role_milestone/__manifest__.py deleted file mode 100644 index a786755d..00000000 --- a/.unported/project_role_milestone/__manifest__.py +++ /dev/null @@ -1,23 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Role Milestone', - 'version': '1.0.0', - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - 'summary': 'Manage role for a project milestone', - 'depends': [ - 'project_role', - 'project_milestone' - ], - 'data': [ - 'views/project_assignment.xml', - 'views/project_milestone.xml', - ], - 'post_init_hook': 'post_init_hook', - 'installable': True, -} diff --git a/.unported/project_role_milestone/i18n/fr.po b/.unported/project_role_milestone/i18n/fr.po deleted file mode 100644 index 775f2400..00000000 --- a/.unported/project_role_milestone/i18n/fr.po +++ /dev/null @@ -1,51 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# *project_role_milestone -# -# Translators: -# Abdellatif Benzbiria ,2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-30\n" -"PO-Revision-Date: 2022-08-30\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_role_milestone -#: model:ir.model.fields,field_description:project_role_milestone.field_project_assignment__milestone_id -#: model_terms:ir.ui.view,arch_db:project_role_milestone.project_assignment_milestone_search -msgid "Milestone" -msgstr "Jalon" - -#. module: project_role_milestone -#: model:ir.model.fields,field_description:project_role_milestone.field_pproject_milestone__assignment_ids -msgid "Milestone assignments" -msgstr "Assignations du jalon" - -#. module: project_role_milestone -#: model_terms:ir.ui.view,arch_db:project_role_milestone.project_milestone_view_search -msgid "Role" -msgstr "Rôle" - - -#. module: project_role_milestone -#: model_terms:ir.actions.act_window,name:project_role_milestone.milestone_assignment_view_action -#: model_terms:ir.ui.view,arch_db:project_role_milestone.project_milestone_view_form -#: model_terms:ir.ui.view,arch_db:project_role_milestone.project_milestone_view_search -msgid "Assignments" -msgstr "Assignations" - -#. module: project_role_milestone -#: sql_constraint:project.assignment:0 -msgid "User may be assigned per role and per milestone only once within a project!" -msgstr "" -"L'utilisateur ne peut être assigné qu'une seule fois par rôle et par jalon dans un même " -"projet!" \ No newline at end of file diff --git a/.unported/project_role_milestone/init_hook.py b/.unported/project_role_milestone/init_hook.py deleted file mode 100644 index f12411c3..00000000 --- a/.unported/project_role_milestone/init_hook.py +++ /dev/null @@ -1,13 +0,0 @@ -import logging - -logger = logging.getLogger(__name__) - - -def post_init_hook(cr, registry): - - cr.execute(" ALTER TABLE project_assignment DROP CONSTRAINT IF EXISTS project_assignment_project_role_user_uniq") - logger.info("project_assignment_project_role_user_uniq was successfully dropped") - cr.execute(" ALTER TABLE project_assignment DROP CONSTRAINT IF EXISTS project_assignment_company_role_user_uniq") - logger.info("project_assignment_company_role_user_uniq was successfully dropped") - - diff --git a/.unported/project_role_milestone/models/__init__.py b/.unported/project_role_milestone/models/__init__.py deleted file mode 100644 index b3b4f5aa..00000000 --- a/.unported/project_role_milestone/models/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_assignment -from . import project_milestone - diff --git a/.unported/project_role_milestone/models/project_assignment.py b/.unported/project_role_milestone/models/project_assignment.py deleted file mode 100644 index dcc4027d..00000000 --- a/.unported/project_role_milestone/models/project_assignment.py +++ /dev/null @@ -1,66 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, models, fields - - -class ProjectAssignment(models.Model): - - _inherit = "project.assignment" - - @api.multi - def _get_conflicting_domain(self): - self.ensure_one() - return [ - ('id', '!=', self.id), - ('role_id', '=', self.role_id.id), - ('user_id', '=', self.user_id.id), - ] + ( - [('company_id', 'in', [False, self.company_id.id])] - if self.company_id else [] - ) + ( - [('project_id', 'in', [False, self.project_id.id])] - if self.project_id else [] - ) + ( - [('milestone_id', 'in', [False, self.milestone_id.id])] - if self.milestone_id else [] - ) - milestone_id = fields.Many2one( - "project.milestone", - string="Milestone", - index=True, - copy=False - ) - - _sql_constraints = [ - ( - 'project_milestone_role_user_uniq', - 'UNIQUE (project_id, role_id, user_id, milestone_id)', - 'User may be assigned per role and per milestone only once within a project!' - ), - ( - 'project_role_user_uniq', - 'Check(1=1)', - 'User may be assigned per role and per milestone only once within a project!' - ) - ] - - @api.onchange('milestone_id') - def onchange_milestone(self): - if self.milestone_id: - project_id = self.milestone_id.project_id - if project_id: - self.project_id = project_id.id - return {'domain': {'project_id': [('id', '=', project_id.id)]}} - else: - project_ids = self.env['project.project'].search([]) - if project_ids: - return {'domain': {'project_id': [('id', 'in', project_ids.ids)]}} - - @api.onchange('project_id') - def onchange_project(self): - if self.project_id: - return {'domain': {'milestone_id': [('project_id', '=', self.project_id.id)]}} - else: - milestone_ids = self.env['project.milestone'].search([]) - if milestone_ids: - return {'domain': {'milestone_id': [('id', 'in', milestone_ids.ids)]}} diff --git a/.unported/project_role_milestone/models/project_milestone.py b/.unported/project_role_milestone/models/project_milestone.py deleted file mode 100644 index e712c741..00000000 --- a/.unported/project_role_milestone/models/project_milestone.py +++ /dev/null @@ -1,14 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import models, fields - - -class ProjectMilestone(models.Model): - - _inherit = "project.milestone" - - assignment_ids = fields.One2many( - "project.assignment", - "milestone_id", - "Milestone assignments", - ) diff --git a/.unported/project_role_milestone/static/description/assignment_milestone.png b/.unported/project_role_milestone/static/description/assignment_milestone.png deleted file mode 100644 index 2fb112a9..00000000 Binary files a/.unported/project_role_milestone/static/description/assignment_milestone.png and /dev/null differ diff --git a/.unported/project_role_milestone/static/description/assignments_by_milsetone.png b/.unported/project_role_milestone/static/description/assignments_by_milsetone.png deleted file mode 100644 index 0ea2a377..00000000 Binary files a/.unported/project_role_milestone/static/description/assignments_by_milsetone.png and /dev/null differ diff --git a/.unported/project_role_milestone/static/description/icon.png b/.unported/project_role_milestone/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_role_milestone/static/description/icon.png and /dev/null differ diff --git a/.unported/project_role_milestone/static/description/milestone_assignements.png b/.unported/project_role_milestone/static/description/milestone_assignements.png deleted file mode 100644 index 03ffe0ef..00000000 Binary files a/.unported/project_role_milestone/static/description/milestone_assignements.png and /dev/null differ diff --git a/.unported/project_role_milestone/tests/__init__.py b/.unported/project_role_milestone/tests/__init__.py deleted file mode 100644 index 95fe6133..00000000 --- a/.unported/project_role_milestone/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import test_project_assignment_milestone diff --git a/.unported/project_role_milestone/tests/test_project_assignment_milestone.py b/.unported/project_role_milestone/tests/test_project_assignment_milestone.py deleted file mode 100644 index 79000a41..00000000 --- a/.unported/project_role_milestone/tests/test_project_assignment_milestone.py +++ /dev/null @@ -1,43 +0,0 @@ -# © 2022 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo.tests import common - - -class TestProjectMilestoneDomain(common.TransactionCase): - - def setUp(self): - super().setUp() - - self.project = self.env['project.project'].create( - {'name': 'Test project'}) - - self.milestone = self.env['project.milestone'].create({ - 'name': 'Milestone', - 'project_id': self.project.id, - }) - self.role = self.env['project.role'].create({ - 'name': 'Role1', - }) - self.user = self.env.ref("base.user_demo") - self.assignment = self.env['project.assignment'].create({ - 'project_id': self.project.id, - 'milestone_id': self.milestone.id, - 'role_id': self.role.id, - 'user_id': self.user.id, - }) - - def test_onchange_milestone(self): - record = self.env['project.assignment'].new() - record.milestone_id = self.milestone.id - res_onchange_milestone = record.onchange_milestone() - self.assertEqual(record.project_id, self.project) - domain = [('id', '=', record.milestone_id.project_id.id)] - self.assertEqual(res_onchange_milestone['domain']['project_id'], domain) - - def test_onchange_project_id(self): - record = self.env['project.assignment'].new() - record.project_id = self.project.id - res_onchange_project = record.onchange_project() - domain = [('project_id', '=', record.project_id.id)] - self.assertTrue(res_onchange_project['domain']['milestone_id']) - self.assertEqual(res_onchange_project['domain']['milestone_id'], domain) diff --git a/.unported/project_role_milestone/views/project_assignment.xml b/.unported/project_role_milestone/views/project_assignment.xml deleted file mode 100644 index 8ff533cf..00000000 --- a/.unported/project_role_milestone/views/project_assignment.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - project.assignment.milestone.form - project.assignment - - - - 0 - - - - - - - - - - project.assignment.milestone.search - project.assignment - - - - - - - - - - - Assignments - project.assignment - kanban,tree,form,pivot,graph - form - - {'default_milestone_id': active_id} - [('milestone_id','=',active_id)] - - - - \ No newline at end of file diff --git a/.unported/project_role_milestone/views/project_milestone.xml b/.unported/project_role_milestone/views/project_milestone.xml deleted file mode 100644 index a46ccd89..00000000 --- a/.unported/project_role_milestone/views/project_milestone.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - project.milestone.form - project.milestone - - - -
-
-
-
-
- - - project.milestone.search - project.milestone - - - - - - - - - -
\ No newline at end of file diff --git a/.unported/project_stage_allow_timesheet/README.rst b/.unported/project_stage_allow_timesheet/README.rst deleted file mode 100644 index f551bb1b..00000000 --- a/.unported/project_stage_allow_timesheet/README.rst +++ /dev/null @@ -1,32 +0,0 @@ -Project Stage Allow Timesheet -============================= - -This module adds the notion of time sheet on project stages. -With this implementation, the field allow_timesheets on project is now readonly and it -is driven by the stage the project is in. - - - -*I go on the project stage configuration. I find an option to* ``Allow Timesheet`` *on tasks in this stage.* - -.. image:: static/description/project_stage_form.png - -*On the list view, the* ``Allow Timesheet`` *field is also visible.* - -.. image:: static/description/project_stage_list.png - -Additionally, the module implements two new constraints that avoid to move time sheets in a project that does not -allow time sheets. - -*It is now forbidden to move a task with time sheets to a project that does not allow time sheets.* - -.. image:: static/description/task_error.png - -*It is not forbidden to move a time sheet into another task if the project does not allow time sheets.* - -.. image:: static/description/timesheet_error.png - - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_stage_allow_timesheet/__init__.py b/.unported/project_stage_allow_timesheet/__init__.py deleted file mode 100644 index 6da4fa4e..00000000 --- a/.unported/project_stage_allow_timesheet/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_stage_allow_timesheet/__manifest__.py b/.unported/project_stage_allow_timesheet/__manifest__.py deleted file mode 100644 index 4f09ff1e..00000000 --- a/.unported/project_stage_allow_timesheet/__manifest__.py +++ /dev/null @@ -1,21 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Stage Allow Timesheet', - 'summary': """ - Allows to tell that a project stage is opened for timesheets.""", - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'depends': [ - 'hr_timesheet', - 'project_stage', - ], - 'data': [ - 'views/project_stage.xml', - ], -} diff --git a/.unported/project_stage_allow_timesheet/i18n/fr.po b/.unported/project_stage_allow_timesheet/i18n/fr.po deleted file mode 100644 index 1b205267..00000000 --- a/.unported/project_stage_allow_timesheet/i18n/fr.po +++ /dev/null @@ -1,48 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_stage_allow_timesheet -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-13 21:34+0000\n" -"PO-Revision-Date: 2019-06-13 21:34+0000\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_stage_allow_timesheet -#: model:ir.model.fields,field_description:project_stage_allow_timesheet.field_project_stage__allow_timesheet -msgid "Allow Timesheet" -msgstr "Autoriser les feuilles de temps" - -#. module: project_stage_allow_timesheet -#: model:ir.model.fields,field_description:project_stage_allow_timesheet.field_project_project__allow_timesheets -msgid "Allow timesheets" -msgstr "Autoriser les feuilles de temps" - -#. module: project_stage_allow_timesheet -#: model:ir.model,name:project_stage_allow_timesheet.model_account_analytic_line -msgid "Analytic Line" -msgstr "Ligne Analytique" - -#. module: project_stage_allow_timesheet -#: model:ir.model.fields,help:project_stage_allow_timesheet.field_project_project__allow_timesheets -msgid "Depends if the project stage allows timesheet." -msgstr "Dépends si l'étape du projet permet les feuilles de temps" - -#. module: project_stage_allow_timesheet -#: code:addons/project_stage_allow_timesheet/models/account_analytic_line.py:14 -#, python-format -msgid "You can't link a time sheet line to a task if its project's stage does not allow it. (Task: {}, Project: {}, Project Stage: {})" -msgstr "Vous ne pouvez pas lier une ligne de feuille de temps à une tâche si l’étape de son projet ne le permet pas. (Tâche: {}; Projet: {}; Étape projet: {})" - -#. module: project_stage_allow_timesheet -#: code:addons/project_stage_allow_timesheet/models/account_analytic_line.py:33 -#, python-format -msgid "You cannot move a task linked to a timesheet line in a project if its stage does not allow it. (Task: {}, Project: {}, Project Stage: {})" -msgstr "Vous ne pouvez déplacer une tâche liée à une ligne de feuille de temps dans un projet si son étape ne le permet pas. (Tâche: {}; Projet: {}; Étape projet: {})" diff --git a/.unported/project_stage_allow_timesheet/models/__init__.py b/.unported/project_stage_allow_timesheet/models/__init__.py deleted file mode 100644 index 3c3e5fcd..00000000 --- a/.unported/project_stage_allow_timesheet/models/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import ( - project_stage, project, account_analytic_line -) diff --git a/.unported/project_stage_allow_timesheet/models/account_analytic_line.py b/.unported/project_stage_allow_timesheet/models/account_analytic_line.py deleted file mode 100644 index 7916bc0f..00000000 --- a/.unported/project_stage_allow_timesheet/models/account_analytic_line.py +++ /dev/null @@ -1,65 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import threading -from odoo import api, models, _ -from odoo.exceptions import ValidationError - - -class AccountAnalyticLine(models.Model): - _inherit = "account.analytic.line" - - @api.constrains("task_id") - def _check_task_project_allow_timesheet(self): - if not _should_apply_constraints(self.env): - return - - error_message = _( - "You can't link a time sheet line to a task if its project's stage does not allow it. " - "(Task: {}, Project: {}, Project Stage: {})" - ) - for rec in self: - task = rec.task_id - project = rec.project_id - stage = project.stage_id - if task and project and stage and not stage.allow_timesheet: - message = error_message.format( - rec.display_name, project.display_name, stage.display_name - ) - raise ValidationError(message) - - -class ProjectTask(models.Model): - _inherit = "project.task" - - @api.constrains("project_id") - def _check_project_move_allow_timesheet(self): - """ Check if a line is moved to another project, the target project must allow time sheet """ - if not _should_apply_constraints(self.env): - return - - error_message = _( - "You cannot move a task linked to a timesheet line in a project if its stage does not allow it. " - "(Task: {}, Project: {}, Project Stage: {})" - ) - - for rec in self: - project = rec.project_id - time_sheets = rec.timesheet_ids - - if time_sheets and project and not project.allow_timesheets: - stage = project.stage_id - message = error_message.format( - rec.display_name, project.display_name, stage.display_name - ) - raise ValidationError(message) - - -def _should_apply_constraints(env): - return not _is_testing() or env.context.get( - "enable_project_stage_allow_timesheet_constraint" - ) - - -def _is_testing(): - return getattr(threading.currentThread(), "testing", False) diff --git a/.unported/project_stage_allow_timesheet/models/project.py b/.unported/project_stage_allow_timesheet/models/project.py deleted file mode 100644 index 2ff1b5f4..00000000 --- a/.unported/project_stage_allow_timesheet/models/project.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import fields, models, api - - -class Project(models.Model): - - _inherit = 'project.project' - - @api.depends('stage_id', 'stage_id.allow_timesheet') - def _compute_allow_timesheet(self): - for record in self: - record.allow_timesheets = record.stage_id.allow_timesheet - - allow_timesheets = fields.Boolean( - readonly=True, compute="_compute_allow_timesheet", store=True, - help="Depends if the project stage allows timesheet." - ) diff --git a/.unported/project_stage_allow_timesheet/models/project_stage.py b/.unported/project_stage_allow_timesheet/models/project_stage.py deleted file mode 100644 index e00bc716..00000000 --- a/.unported/project_stage_allow_timesheet/models/project_stage.py +++ /dev/null @@ -1,25 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import fields, models - - -class ProjectStage(models.Model): - - _inherit = 'project.stage' - - allow_timesheet = fields.Boolean( - default=True, - ) - - - -class ProjectTaskType(models.Model): - - _inherit = 'project.task.type' - - allow_timesheet = fields.Boolean( - string="Allow timesheets", - default=True, - ) - diff --git a/.unported/project_stage_allow_timesheet/static/description/icon.png b/.unported/project_stage_allow_timesheet/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_stage_allow_timesheet/static/description/icon.png and /dev/null differ diff --git a/.unported/project_stage_allow_timesheet/static/description/project_stage_form.png b/.unported/project_stage_allow_timesheet/static/description/project_stage_form.png deleted file mode 100644 index fa07843c..00000000 Binary files a/.unported/project_stage_allow_timesheet/static/description/project_stage_form.png and /dev/null differ diff --git a/.unported/project_stage_allow_timesheet/static/description/project_stage_list.png b/.unported/project_stage_allow_timesheet/static/description/project_stage_list.png deleted file mode 100644 index 1f6eff23..00000000 Binary files a/.unported/project_stage_allow_timesheet/static/description/project_stage_list.png and /dev/null differ diff --git a/.unported/project_stage_allow_timesheet/static/description/task_error.png b/.unported/project_stage_allow_timesheet/static/description/task_error.png deleted file mode 100644 index 4f046c13..00000000 Binary files a/.unported/project_stage_allow_timesheet/static/description/task_error.png and /dev/null differ diff --git a/.unported/project_stage_allow_timesheet/static/description/timesheet_error.png b/.unported/project_stage_allow_timesheet/static/description/timesheet_error.png deleted file mode 100644 index f73954f3..00000000 Binary files a/.unported/project_stage_allow_timesheet/static/description/timesheet_error.png and /dev/null differ diff --git a/.unported/project_stage_allow_timesheet/tests/__init__.py b/.unported/project_stage_allow_timesheet/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/.unported/project_stage_allow_timesheet/tests/test_project_task.py b/.unported/project_stage_allow_timesheet/tests/test_project_task.py deleted file mode 100644 index 0e2c9cdd..00000000 --- a/.unported/project_stage_allow_timesheet/tests/test_project_task.py +++ /dev/null @@ -1,50 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo.exceptions import ValidationError -from odoo.tests import common - - -class TestTask(common.SavepointCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - context = dict( - cls.env.context, enable_project_stage_allow_timesheet_constraint=True - ) - cls.env = cls.env(context=context) - cls.project_stage_timesheet = cls.env["project.stage"].create( - {"name": "project_stage", "allow_timesheet": True} - ) - cls.project_stage_no_timesheet = cls.env["project.stage"].create( - {"name": "project_stage_no_timesheet", "allow_timesheet": False} - ) - cls.project_timesheet = cls.env["project.project"].create( - {"name": "tproject", "stage_id": cls.project_stage_timesheet.id} - ) - - cls.project_no_timesheet = cls.env["project.project"].create( - {"name": "tproject_no", "stage_id": cls.project_stage_no_timesheet.id} - ) - - cls.task_no_timesheet = cls.env["project.task"].create( - {"name": "tTask_no", "project_id": cls.project_no_timesheet.id} - ) - cls.task_timesheet = cls.env["project.task"].create( - {"name": "tTask_no", "project_id": cls.project_timesheet.id} - ) - - cls.account_analytic_line = cls.env["account.analytic.line"].create( - { - "name": "line", - "task_id": cls.task_timesheet.id, - "project_id": cls.project_timesheet.id, - } - ) - - def test_whenTaskWithTimeSheetIsSetToProjectNoTimeSheet_thenRaiseError(self): - with self.assertRaises(ValidationError): - self.task_timesheet.project_id = self.project_no_timesheet - - def test_whenAALMovedToProjectNoTimeSheet_thenRaiseError(self): - with self.assertRaises(ValidationError): - self.task_timesheet.project_id = self.project_no_timesheet.id diff --git a/.unported/project_stage_allow_timesheet/views/project_stage.xml b/.unported/project_stage_allow_timesheet/views/project_stage.xml deleted file mode 100644 index 28eff34f..00000000 --- a/.unported/project_stage_allow_timesheet/views/project_stage.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - Project stage: allow timesheet - project.stage - - - - - - - - - Project stage: allow timesheet - project.stage - - - - - - - - - diff --git a/.unported/project_task_analytic_lines_stock/README.rst b/.unported/project_task_analytic_lines_stock/README.rst deleted file mode 100644 index 73a61db8..00000000 --- a/.unported/project_task_analytic_lines_stock/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -Project Task Analytic Lines (Stock Binding) -=========================================== - -.. contents:: Table of Contents - -Summary -------- -This module is a binding between project_task_analytic_lines and the inventory application. - -Real Time Inventory -------------------- -When using a real time inventory, journal items are added with the customer invoice -to recognize the cost of goods sold. - -The task is propagated to these entries. - -Note For Purchases ------------------- -The real time inventory journal items generated by a supplier invoice should logically -never be bound to a task. - -The reason is that journal entries for incomming stocks should not have an analytic account, -because these are not expenses. - -This note is True if you are using `Accrual Based Accounting` (what Odoo calls anglo-saxon accounting), -which is the right accounting method for most compangies. - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_task_analytic_lines_stock/__init__.py b/.unported/project_task_analytic_lines_stock/__init__.py deleted file mode 100644 index 1bf94a8b..00000000 --- a/.unported/project_task_analytic_lines_stock/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import ( - account_invoice, -) diff --git a/.unported/project_task_analytic_lines_stock/__manifest__.py b/.unported/project_task_analytic_lines_stock/__manifest__.py deleted file mode 100644 index 3f9b33bf..00000000 --- a/.unported/project_task_analytic_lines_stock/__manifest__.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Task Analytic Lines (Stock Binding)', - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'summary': 'Add a task on journal entries and vendor bills', - 'depends': [ - 'project_task_analytic_lines', - 'stock_account', - ], - 'auto_install': True, - 'installable': True, -} diff --git a/.unported/project_task_analytic_lines_stock/account_invoice.py b/.unported/project_task_analytic_lines_stock/account_invoice.py deleted file mode 100644 index 11de3260..00000000 --- a/.unported/project_task_analytic_lines_stock/account_invoice.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models - - -class Invoice(models.Model): - - _inherit = "account.invoice" - - @api.model - def _anglo_saxon_sale_move_lines(self, i_line): - """Propagate the task to journal items.""" - result = super()._anglo_saxon_sale_move_lines(i_line) - for vals in result: - if vals.get("account_analytic_id"): - vals["task_id"] = i_line.task_id.id - return result diff --git a/.unported/project_task_analytic_lines_stock/static/description/icon.png b/.unported/project_task_analytic_lines_stock/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_task_analytic_lines_stock/static/description/icon.png and /dev/null differ diff --git a/.unported/project_task_analytic_lines_stock/tests/__init__.py b/.unported/project_task_analytic_lines_stock/tests/__init__.py deleted file mode 100644 index 6ef2df91..00000000 --- a/.unported/project_task_analytic_lines_stock/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_task_analytic_lines_stock/tests/test_invoice_propagation.py b/.unported/project_task_analytic_lines_stock/tests/test_invoice_propagation.py deleted file mode 100644 index ce193f23..00000000 --- a/.unported/project_task_analytic_lines_stock/tests/test_invoice_propagation.py +++ /dev/null @@ -1,31 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.addons.project_task_analytic_lines.tests.common import InvoiceCase - - -class TestTaskPropagation(InvoiceCase): - """Run the same tests with a customer invoice. - - The behavior should be the same. - """ - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.product_cost = 40 - cls.product = cls.env['product.product'].create({ - 'name': 'Product A', - 'type': 'product', - 'standard_price': cls.product_cost, - 'property_valuation': 'real_time', - }) - cls.invoice.type = 'out_invoice' - cls.invoice.invoice_line_ids.product_id = cls.product - - def test_task_propagated_to_cost_move_line(self): - self._validate_invoice() - move_line = self.invoice.move_id.line_ids.filtered( - lambda l: l.debit == self.product_cost) - assert len(move_line) == 1 - assert move_line.task_id == self.task diff --git a/.unported/project_task_customer_reference/README.rst b/.unported/project_task_customer_reference/README.rst deleted file mode 100644 index 73d0999d..00000000 --- a/.unported/project_task_customer_reference/README.rst +++ /dev/null @@ -1,28 +0,0 @@ -Project Task Customer Reference -=============================== - -.. contents:: Table of Contents - -Usage ------ -This module adds a customer reference field to project tasks under the "Extra Info" tab. - -.. image:: static/description/field.png - -This customer reference can also be updated in the portal view by clicking on "Modify". - -.. image:: static/description/portal.png - -You can then enter the new customer reference and submit, which will update the customer reference. - -.. image:: static/description/enter_new.png - -.. image:: static/description/updated.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) - -More information ----------------- -* Meet us at https://bit.ly/numigi-com diff --git a/.unported/project_task_customer_reference/__init__.py b/.unported/project_task_customer_reference/__init__.py deleted file mode 100644 index 0f4e0783..00000000 --- a/.unported/project_task_customer_reference/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models -from . import controllers diff --git a/.unported/project_task_customer_reference/__manifest__.py b/.unported/project_task_customer_reference/__manifest__.py deleted file mode 100644 index 856dcb75..00000000 --- a/.unported/project_task_customer_reference/__manifest__.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Task Customer Reference", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "depends": ["project", "portal"], - "data": [ - "views/project_views.xml", - "views/project_portal_templates.xml", - ], - "installable": True, -} diff --git a/.unported/project_task_customer_reference/controllers/__init__.py b/.unported/project_task_customer_reference/controllers/__init__.py deleted file mode 100644 index 3e804349..00000000 --- a/.unported/project_task_customer_reference/controllers/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import portal diff --git a/.unported/project_task_customer_reference/controllers/portal.py b/.unported/project_task_customer_reference/controllers/portal.py deleted file mode 100644 index 4f28409f..00000000 --- a/.unported/project_task_customer_reference/controllers/portal.py +++ /dev/null @@ -1,36 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/gpl). - -from odoo.addons.portal.controllers.portal import CustomerPortal as _Portal -from odoo.http import request, route -from odoo.exceptions import AccessError, MissingError - - -class Portal(_Portal): - @route( - ["/my/task//modify_reference"], - type="http", - auth="public", - website=True, - ) - def task_update_customer_reference(self, task_id, token=None, reference=None, **kw): - task = _get_task(task_id) - - if task is None: - return request.redirect("/my") - try: - task_sudo = self._document_check_access( - "project.task", task.id, access_token=token - ) - except (AccessError, MissingError): - return request.redirect("/my") - - task_sudo.customer_reference = reference - - url = task.get_portal_url() - return request.redirect(url) - - -def _get_task(task_id): - task = request.env["project.task"].sudo().search([("id", "=", task_id)], limit=1) - return task diff --git a/.unported/project_task_customer_reference/i18n/fr.po b/.unported/project_task_customer_reference/i18n/fr.po deleted file mode 100644 index 6715fca5..00000000 --- a/.unported/project_task_customer_reference/i18n/fr.po +++ /dev/null @@ -1,53 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_task_customer_reference -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-16 21:56+0000\n" -"PO-Revision-Date: 2021-11-16 16:58-0500\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 2.3\n" -"Last-Translator: \n" -"Language: fr\n" - -#. module: project_task_customer_reference -#: model_terms:ir.ui.view,arch_db:project_task_customer_reference.portal_my_task -msgid "&times;" -msgstr "&times;" - -#. module: project_task_customer_reference -#: model_terms:ir.ui.view,arch_db:project_task_customer_reference.portal_my_task -msgid "Customer Reference:" -msgstr "Référence client:" - -#. module: project_task_customer_reference -#: model_terms:ir.ui.view,arch_db:project_task_customer_reference.portal_my_task -msgid "Close" -msgstr "Fermer" - -#. module: project_task_customer_reference -#: model:ir.model.fields,field_description:project_task_customer_reference.field_project_task__customer_reference -msgid "Customer Reference" -msgstr "Référence Client" - -#. module: project_task_customer_reference -#: model_terms:ir.ui.view,arch_db:project_task_customer_reference.portal_my_task -msgid "Modify" -msgstr "Modifier" - -#. module: project_task_customer_reference -#: model_terms:ir.ui.view,arch_db:project_task_customer_reference.portal_my_task -msgid "Modify Customer Reference" -msgstr "Modifier la référence client" - -#. module: project_task_customer_reference -#: model:ir.model,name:project_task_customer_reference.model_project_task -msgid "Task" -msgstr "Tâche" diff --git a/.unported/project_task_customer_reference/models/__init__.py b/.unported/project_task_customer_reference/models/__init__.py deleted file mode 100644 index d0523241..00000000 --- a/.unported/project_task_customer_reference/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project diff --git a/.unported/project_task_customer_reference/models/project.py b/.unported/project_task_customer_reference/models/project.py deleted file mode 100644 index 5c1d10a2..00000000 --- a/.unported/project_task_customer_reference/models/project.py +++ /dev/null @@ -1,12 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models -from uuid import uuid4 -from odoo.exceptions import AccessError - - -class Task(models.Model): - _inherit = "project.task" - - customer_reference = fields.Char() diff --git a/.unported/project_task_customer_reference/static/description/enter_new.png b/.unported/project_task_customer_reference/static/description/enter_new.png deleted file mode 100644 index d6553fa8..00000000 Binary files a/.unported/project_task_customer_reference/static/description/enter_new.png and /dev/null differ diff --git a/.unported/project_task_customer_reference/static/description/field.png b/.unported/project_task_customer_reference/static/description/field.png deleted file mode 100644 index 904ae270..00000000 Binary files a/.unported/project_task_customer_reference/static/description/field.png and /dev/null differ diff --git a/.unported/project_task_customer_reference/static/description/icon.png b/.unported/project_task_customer_reference/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_task_customer_reference/static/description/icon.png and /dev/null differ diff --git a/.unported/project_task_customer_reference/static/description/portal.png b/.unported/project_task_customer_reference/static/description/portal.png deleted file mode 100644 index 6be562c0..00000000 Binary files a/.unported/project_task_customer_reference/static/description/portal.png and /dev/null differ diff --git a/.unported/project_task_customer_reference/static/description/updated.png b/.unported/project_task_customer_reference/static/description/updated.png deleted file mode 100644 index 3b8918cd..00000000 Binary files a/.unported/project_task_customer_reference/static/description/updated.png and /dev/null differ diff --git a/.unported/project_task_customer_reference/tests/__init__.py b/.unported/project_task_customer_reference/tests/__init__.py deleted file mode 100644 index 457a8b5c..00000000 --- a/.unported/project_task_customer_reference/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import test_customer_reference diff --git a/.unported/project_task_customer_reference/tests/test_customer_reference.py b/.unported/project_task_customer_reference/tests/test_customer_reference.py deleted file mode 100644 index 07ef81de..00000000 --- a/.unported/project_task_customer_reference/tests/test_customer_reference.py +++ /dev/null @@ -1,54 +0,0 @@ -# © 2021 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from ..controllers.portal import Portal -from odoo.tests.common import SavepointCase -from odoo.addons.test_http_request.common import mock_odoo_request - - -class TestCustomerReference(SavepointCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.task = cls.env["project.task"].create( - { - "name": "test_task", - "customer_reference": "old", - "access_token": "123456" - } - ) - - cls.partner = cls.env["res.partner"].create( - { - "name": "Participant 1", - "email": "participant1@example.com", - } - ) - - cls.user = cls.env["res.users"].create( - { - "partner_id": cls.partner.id, - "email": "participant@example.com", - "login": "participant", - "name": "Participant", - } - ) - - def test_sign_controller_employee(self): - new_reference = "new" - self._update_reference(new_reference, self.user, None) - assert self.task.customer_reference == new_reference - - def test_sign_controller_public(self): - new_reference = "new" - self._update_reference(new_reference, self.env.ref('base.public_user'), self.task.access_token) - assert self.task.customer_reference == new_reference - - def _update_reference(self, new_reference, user, token): - env = self.env(user=user.id) - with mock_odoo_request(env, routing_type="http"): - return Portal().task_update_customer_reference( - self.task.id, - reference=new_reference, - token=token - ) diff --git a/.unported/project_task_customer_reference/views/project_portal_templates.xml b/.unported/project_task_customer_reference/views/project_portal_templates.xml deleted file mode 100644 index ca364668..00000000 --- a/.unported/project_task_customer_reference/views/project_portal_templates.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - diff --git a/.unported/project_task_customer_reference/views/project_views.xml b/.unported/project_task_customer_reference/views/project_views.xml deleted file mode 100644 index 8f07d4df..00000000 --- a/.unported/project_task_customer_reference/views/project_views.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - project.task.form - project.task - - - - - - - - - diff --git a/.unported/project_task_editable_list_stage/README.rst b/.unported/project_task_editable_list_stage/README.rst deleted file mode 100644 index 16e1acec..00000000 --- a/.unported/project_task_editable_list_stage/README.rst +++ /dev/null @@ -1,9 +0,0 @@ -Project Task Editable List Stage -================================ -This module adds the field ``Stage`` to the editable list of tasks. - -.. image:: static/description/task_list.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_task_editable_list_stage/__init__.py b/.unported/project_task_editable_list_stage/__init__.py deleted file mode 100644 index 933f1b4b..00000000 --- a/.unported/project_task_editable_list_stage/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_task_editable_list_stage/__manifest__.py b/.unported/project_task_editable_list_stage/__manifest__.py deleted file mode 100644 index 405dd330..00000000 --- a/.unported/project_task_editable_list_stage/__manifest__.py +++ /dev/null @@ -1,16 +0,0 @@ -# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Task Editable List Stage", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Add the field stage to the editable list view of tasks", - "depends": ["project_task_editable_list_view"], - "data": ["views/project_task.xml"], - "installable": True, -} diff --git a/.unported/project_task_editable_list_stage/static/description/icon.png b/.unported/project_task_editable_list_stage/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_task_editable_list_stage/static/description/icon.png and /dev/null differ diff --git a/.unported/project_task_editable_list_stage/static/description/task_list.png b/.unported/project_task_editable_list_stage/static/description/task_list.png deleted file mode 100644 index 84b72115..00000000 Binary files a/.unported/project_task_editable_list_stage/static/description/task_list.png and /dev/null differ diff --git a/.unported/project_task_editable_list_stage/views/project_task.xml b/.unported/project_task_editable_list_stage/views/project_task.xml deleted file mode 100644 index 957873f5..00000000 --- a/.unported/project_task_editable_list_stage/views/project_task.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Task Editable List View: Add stage_id - project.task - - - - - - - - - diff --git a/.unported/project_task_kanban_view_partner/README.rst b/.unported/project_task_kanban_view_partner/README.rst deleted file mode 100644 index 3dd10bc9..00000000 --- a/.unported/project_task_kanban_view_partner/README.rst +++ /dev/null @@ -1,23 +0,0 @@ -Project Task Kanban View Partner -================================ - -.. contents:: Table of Contents - -Overview --------- - -This module replaces the email with client field in task kanban view. - -Usage ------ -There is now the customer field under task kanban view. - - .. image:: static/description/project_task_kanban_partner.png - :width: 100% - :align: center - :height: 600px - :alt: project_task_kanban_partner - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_task_kanban_view_partner/__init__.py b/.unported/project_task_kanban_view_partner/__init__.py deleted file mode 100644 index 29cd4fa1..00000000 --- a/.unported/project_task_kanban_view_partner/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_task_kanban_view_partner/__manifest__.py b/.unported/project_task_kanban_view_partner/__manifest__.py deleted file mode 100644 index 4660b0e4..00000000 --- a/.unported/project_task_kanban_view_partner/__manifest__.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Project Task Kanban View Partner", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Replace email with customer in project task kanban view", - "depends": ["project"], - "data": [ - "views/project_view.xml" - ], - "installable": True, -} diff --git a/.unported/project_task_kanban_view_partner/i18n/fr.po b/.unported/project_task_kanban_view_partner/i18n/fr.po deleted file mode 100644 index 162b0aad..00000000 --- a/.unported/project_task_kanban_view_partner/i18n/fr.po +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-28 13:11+0000\n" -"PO-Revision-Date: 2022-06-28 13:11+0000\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" - diff --git a/.unported/project_task_kanban_view_partner/static/description/icon.png b/.unported/project_task_kanban_view_partner/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_task_kanban_view_partner/static/description/icon.png and /dev/null differ diff --git a/.unported/project_task_kanban_view_partner/static/description/project_task_kanban_partner.png b/.unported/project_task_kanban_view_partner/static/description/project_task_kanban_partner.png deleted file mode 100644 index 752b89e0..00000000 Binary files a/.unported/project_task_kanban_view_partner/static/description/project_task_kanban_partner.png and /dev/null differ diff --git a/.unported/project_task_kanban_view_partner/views/project_view.xml b/.unported/project_task_kanban_view_partner/views/project_view.xml deleted file mode 100644 index ce5fc295..00000000 --- a/.unported/project_task_kanban_view_partner/views/project_view.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - project.task.kanban - project.task - - - - - - - - diff --git a/.unported/project_task_subtask_same_project/README.rst b/.unported/project_task_subtask_same_project/README.rst deleted file mode 100644 index 12897b9b..00000000 --- a/.unported/project_task_subtask_same_project/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -Project Task Subtask Same Project -================================= -Force the subtasks to be on the same project than its parent. - -.. contents:: Table of Contents - -Project Readonly on Subtask ---------------------------- -On the form view of a subtask, the project is readonly. -The value is automatically propagated from the parent task. - -.. image:: project_task_subtask_same_project/static/description/subtask_project_readonly.png - -Subtask Project Field ---------------------- -On the config view of a project, the field ``Sub-task Project`` is hidden. - -.. image:: project_task_subtask_same_project/static/description/subtask_project_id_hidden.png - -Kanban Project Filter ---------------------- -In the kanban view of subtasks, the project filter is removed. - -.. image:: project_task_subtask_same_project/static/description/subtask_kanban_no_project_filter.png - -If a subtask is in a different project (which should not happen), it will not be hidden. - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_task_subtask_same_project/__init__.py b/.unported/project_task_subtask_same_project/__init__.py deleted file mode 100644 index fd8d2296..00000000 --- a/.unported/project_task_subtask_same_project/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_task_subtask_same_project/__manifest__.py b/.unported/project_task_subtask_same_project/__manifest__.py deleted file mode 100644 index 3aafc616..00000000 --- a/.unported/project_task_subtask_same_project/__manifest__.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project Task Subtask Same Project', - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'summary': 'Constrain a subtask to be on the same project that its parent.', - 'depends': ['project'], - 'data': [ - 'views/project.xml', - 'views/project_task.xml', - ], - 'installable': True, -} diff --git a/.unported/project_task_subtask_same_project/i18n/fr.po b/.unported/project_task_subtask_same_project/i18n/fr.po deleted file mode 100644 index acd03f35..00000000 --- a/.unported/project_task_subtask_same_project/i18n/fr.po +++ /dev/null @@ -1,27 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_task_subtask_same_project -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-24 20:51+0000\n" -"PO-Revision-Date: 2019-10-24 20:51+0000\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_task_subtask_same_project -#: model:ir.model,name:project_task_subtask_same_project.model_project_task -msgid "Task" -msgstr "" - -#. module: project_task_subtask_same_project -#: code:addons/project_task_subtask_same_project/models/project_task.py:43 -#, python-format -msgid "The task {task} is in the project {task_project}. The subtask {subtask} must be in the same project." -msgstr "La tâche {task} est dans le projet {task_project}. La sous-tâche {subtask} doit être dans le même projet." diff --git a/.unported/project_task_subtask_same_project/models/__init__.py b/.unported/project_task_subtask_same_project/models/__init__.py deleted file mode 100644 index e7b9e509..00000000 --- a/.unported/project_task_subtask_same_project/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_task diff --git a/.unported/project_task_subtask_same_project/models/project_task.py b/.unported/project_task_subtask_same_project/models/project_task.py deleted file mode 100644 index 2d34de00..00000000 --- a/.unported/project_task_subtask_same_project/models/project_task.py +++ /dev/null @@ -1,47 +0,0 @@ -# © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, api, _ -from odoo.exceptions import ValidationError - - -class ProjectTaskSubtaskSameProject(models.Model): - _inherit = 'project.task' - - def write(self, vals): - """ Propagate the value of the project to the subtask when it is changed on the parent task.""" - res = super().write(vals) - for task in self: - if task.child_ids and 'project_id' in vals: - task.child_ids.write({'project_id': vals['project_id']}) - return res - - def action_subtask(self): - """Remove project filters from the subtask action context.""" - res = super().action_subtask() - - context_vars_to_remove = ( - 'search_default_project_id', - ) - - res['context'] = { - k: v for k, v in res['context'].items() if - k not in context_vars_to_remove - } - return res - - @api.constrains('project_id') - def _check_subtask_not_in_different_project(self): - subtasks = self.filtered(lambda t: t.parent_id) - - for subtask in subtasks: - task = subtask.parent_id - if subtask.project_id != task.project_id: - raise ValidationError(_( - 'The task {task} is in the project {task_project}. ' - 'The subtask {subtask} must be in the same project.' - ).format( - task=task.display_name, - task_project=task.project_id.display_name, - subtask=subtask.display_name, - )) diff --git a/.unported/project_task_subtask_same_project/static/description/icon.png b/.unported/project_task_subtask_same_project/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_task_subtask_same_project/static/description/icon.png and /dev/null differ diff --git a/.unported/project_task_subtask_same_project/static/description/subtask_kanban_no_project_filter.png b/.unported/project_task_subtask_same_project/static/description/subtask_kanban_no_project_filter.png deleted file mode 100644 index 778c5a2f..00000000 Binary files a/.unported/project_task_subtask_same_project/static/description/subtask_kanban_no_project_filter.png and /dev/null differ diff --git a/.unported/project_task_subtask_same_project/static/description/subtask_project_id_hidden.png b/.unported/project_task_subtask_same_project/static/description/subtask_project_id_hidden.png deleted file mode 100644 index 92a75d54..00000000 Binary files a/.unported/project_task_subtask_same_project/static/description/subtask_project_id_hidden.png and /dev/null differ diff --git a/.unported/project_task_subtask_same_project/static/description/subtask_project_readonly.png b/.unported/project_task_subtask_same_project/static/description/subtask_project_readonly.png deleted file mode 100644 index f07b3157..00000000 Binary files a/.unported/project_task_subtask_same_project/static/description/subtask_project_readonly.png and /dev/null differ diff --git a/.unported/project_task_subtask_same_project/tests/__init__.py b/.unported/project_task_subtask_same_project/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/.unported/project_task_subtask_same_project/tests/test_project_task.py b/.unported/project_task_subtask_same_project/tests/test_project_task.py deleted file mode 100644 index b55f5b5f..00000000 --- a/.unported/project_task_subtask_same_project/tests/test_project_task.py +++ /dev/null @@ -1,56 +0,0 @@ -# © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import pytest -from odoo.exceptions import ValidationError -from odoo.tests import common - - -class TestProjectTaskSubTaskSameProject(common.SavepointCase): - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.project_a = cls.env['project.project'].create({'name': 'projectA'}) - cls.project_b = cls.env['project.project'].create({'name': 'projectB'}) - cls.task_parent = cls.env['project.task'].create({ - 'name': 'Task Parent', 'project_id': cls.project_a.id - }) - cls.subtask_1 = cls.env['project.task'].create({ - 'name': 'Task Child 1', - 'project_id': cls.task_parent.project_id.id, - 'parent_id': cls.task_parent.id, - 'min_hours': 0.5, - 'planned_hours': 1.0, - 'max_hours': 2.0 - }) - cls.subtask_2 = cls.env['project.task'].create({ - 'name': 'Task Child 2', - 'project_id': cls.task_parent.project_id.id, - 'parent_id': cls.task_parent.id, - 'min_hours': 0.5, - 'planned_hours': 1.0, - 'max_hours': 2.0 - }) - - def test_whenParentTaskChangeProject_thenSubTaskInheritNewProject(self): - """ - Given a parent task is on project A - And the subtasks are on project A too - - When the parent task is changed to project B - - Then the subtasks are changed to project B too. - """ - self.task_parent.project_id = self.project_b.id - - assert self.subtask_1.project_id == self.project_b - assert self.subtask_2.project_id == self.project_b - - def test_onSubTaskAction_noProjectFilterApplied(self): - res = self.task_parent.action_subtask() - assert 'search_default_project_id' not in res['context'] - - def test_onUpdateSubtask_ifNotSameProject_raiseError(self): - with pytest.raises(ValidationError): - self.subtask_1.project_id = self.project_b diff --git a/.unported/project_task_subtask_same_project/views/project.xml b/.unported/project_task_subtask_same_project/views/project.xml deleted file mode 100644 index 53617fbc..00000000 --- a/.unported/project_task_subtask_same_project/views/project.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - Project Form: Hide subtask_project_id - project.project - - - - 1 - - - - diff --git a/.unported/project_task_subtask_same_project/views/project_task.xml b/.unported/project_task_subtask_same_project/views/project_task.xml deleted file mode 100644 index 24dbbd90..00000000 --- a/.unported/project_task_subtask_same_project/views/project_task.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - Project task: Project Readonly for Subtasks - project.task - - - - {'readonly': [('parent_id', '!=', False)]} - - - - - - - - - Project task: Project Readonly for Subtasks Kanban - project.task - - - - - - - {'readonly': [('parent_id', '!=', False)]} - - - - - diff --git a/.unported/project_wip_material/README.rst b/.unported/project_wip_material/README.rst deleted file mode 100644 index 5374122e..00000000 --- a/.unported/project_wip_material/README.rst +++ /dev/null @@ -1,21 +0,0 @@ -Project WIP Material -==================== -This module is a binding between ``project_wip`` (Project Work in Progress) and ``project_material`` (Material Consumption on Projects) - -After consuming the products, the cost is accruded in the WIP account of the project. - -Usage ------ -In the general ledger, I filter the journal items to see only items related to my project: - -.. image:: static/description/general_ledger_analytic_filter.png - -I notice that 2 debit entries were posted in the ``Work in Progress`` account, one for each product consumed. - -In the analytic lines list, I also find 2 entries for the consumed products. - -.. image:: static/description/analytic_line_list.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_wip_material/__init__.py b/.unported/project_wip_material/__init__.py deleted file mode 100644 index 6da4fa4e..00000000 --- a/.unported/project_wip_material/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_wip_material/__manifest__.py b/.unported/project_wip_material/__manifest__.py deleted file mode 100644 index 3a30dce6..00000000 --- a/.unported/project_wip_material/__manifest__.py +++ /dev/null @@ -1,18 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project WIP Material', - 'version': '1.1.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'summary': 'WIP accounting entries from consumed products', - 'depends': [ - 'project_material', - 'project_wip', - ], - 'installable': True, -} diff --git a/.unported/project_wip_material/i18n/fr.po b/.unported/project_wip_material/i18n/fr.po deleted file mode 100644 index c27cfac1..00000000 --- a/.unported/project_wip_material/i18n/fr.po +++ /dev/null @@ -1,68 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_wip_material -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-09 15:30+0000\n" -"PO-Revision-Date: 2020-12-09 10:32-0500\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.0.6\n" - -#. module: project_wip_material -#: code:addons/project_wip_material/models/project_task_material.py:32 -#, python-format -msgid "" -"Material can not be added to the task because the project type {} has no WIP " -"account." -msgstr "" -"Le matériel ne peut pas être ajouté à la tâche, car le type de projet {} n'a " -"pas de compte de TEC." - -#. module: project_wip_material -#: code:addons/project_wip_material/models/project_task_material.py:26 -#, python-format -msgid "" -"Material can not be added to the task because the project {} has no project " -"type." -msgstr "" -"Le matériel ne peut pas être ajouté à la tâche, car le projet {} n'a pas de " -"type de projet." - -#. module: project_wip_material -#: model:ir.model,name:project_wip_material.model_stock_move -msgid "Stock Move" -msgstr "" - -#. module: project_wip_material -#: model:ir.model,name:project_wip_material.model_project_task_material -msgid "Task Material Consumption" -msgstr "" - -#. module: project_wip_material -#: code:addons/project_wip_material/models/stock_move.py:80 -#, python-format -msgid "" -"The transfer {picking} can not be processed because the project type " -"{project_type} has no WIP account." -msgstr "" -"Le transfert {picking} ne peut pas être traité car le type de projet " -"{project_type} n'a pas de compte de TEC." - -#. module: project_wip_material -#: code:addons/project_wip_material/models/stock_move.py:71 -#, python-format -msgid "" -"The transfer {picking} can not be processed because the project {project} " -"has no project type." -msgstr "" -"Le transfert {picking} ne peut pas être traité car le projet {project} n'a " -"pas de type de projet." diff --git a/.unported/project_wip_material/models/__init__.py b/.unported/project_wip_material/models/__init__.py deleted file mode 100644 index 5850788a..00000000 --- a/.unported/project_wip_material/models/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# © 2019 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import ( - project_task_material, - stock_move, -) diff --git a/.unported/project_wip_material/models/project_task_material.py b/.unported/project_wip_material/models/project_task_material.py deleted file mode 100644 index 621e0710..00000000 --- a/.unported/project_wip_material/models/project_task_material.py +++ /dev/null @@ -1,35 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import threading -from odoo import models, _ -from odoo.exceptions import ValidationError - - -class TaskMaterialLine(models.Model): - """Prevent adding material if the project is not properly set for accounting.""" - - _inherit = 'project.task.material' - - def _run_procurements(self): - if self._must_check_project_wip_account(): - self._check_project_wip_account() - return super()._run_procurements() - - def _must_check_project_wip_account(self): - is_testing = getattr(threading.currentThread(), 'testing', False) - return not is_testing or self._context.get('apply_project_wip_material_constraints') - - def _check_project_wip_account(self): - project = self.task_id.project_id - if not project.project_type_id: - raise ValidationError(_( - 'Material can not be added to the task because ' - 'the project {} has no project type.' - ).format(project.display_name)) - - if not project.project_type_id.wip_account_id: - raise ValidationError(_( - 'Material can not be added to the task because ' - 'the project type {} has no WIP account.' - ).format(project.project_type_id.display_name)) diff --git a/.unported/project_wip_material/models/stock_move.py b/.unported/project_wip_material/models/stock_move.py deleted file mode 100644 index e5c2b477..00000000 --- a/.unported/project_wip_material/models/stock_move.py +++ /dev/null @@ -1,92 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, _ -from odoo.exceptions import ValidationError - - -class StockMove(models.Model): - """Generate WIP journal entries for consumption moves.""" - - _inherit = 'stock.move' - - def _is_in(self): - """Use the same valuation as incoming moves for consumption return.""" - return super()._is_in() or self._is_consumption_return() - - def _is_out(self): - """Use the same valuation as outgoing moves for consumptions.""" - return super()._is_out() or self._is_consumption() - - def _account_entry_move(self): - self.ensure_one() - if self._is_consumption(): - self._generate_consumption_account_move() - elif self._is_consumption_return(): - self._generate_consumption_return_account_move() - else: - super()._account_entry_move() - - def _prepare_account_move_line(self, qty, cost, credit_account_id, debit_account_id): - """Add the analytic to WIP account move lines.""" - move_line_vals = super()._prepare_account_move_line( - qty, cost, credit_account_id, debit_account_id) - - if self._is_consumption() or self._is_consumption_return(): - wip_account = self._get_wip_account() - analytic_account = self._get_project_analytic_account() - lines_with_wip_account = ( - line for line in move_line_vals - if line[2]['account_id'] == wip_account.id - ) - for line in lines_with_wip_account: - line[2]['analytic_account_id'] = analytic_account.id - line[2]['task_id'] = self.task_id.id - - return move_line_vals - - def _is_consumption(self): - return self.picking_code == 'consumption' - - def _is_consumption_return(self): - return self.picking_code == 'consumption_return' - - def _generate_consumption_account_move(self): - self._check_project_has_wip_account() - wip_account = self._get_wip_account() - journal_id, dummy, dummy, acc_valuation = self._get_accounting_data_for_valuation() - self.with_context(force_company=self.project_id.company_id.id)._create_account_move_line( - debit_account_id=wip_account.id, credit_account_id=acc_valuation, journal_id=journal_id) - - def _generate_consumption_return_account_move(self): - self._check_project_has_wip_account() - wip_account = self._get_wip_account() - journal_id, dummy, dummy, acc_valuation = self._get_accounting_data_for_valuation() - self.with_context(force_company=self.project_id.company_id.id)._create_account_move_line( - debit_account_id=acc_valuation, credit_account_id=wip_account.id, journal_id=journal_id) - - def _check_project_has_wip_account(self): - project = self.project_id - if not project.project_type_id: - raise ValidationError(_( - 'The transfer {picking} can not be processed because ' - 'the project {project} has no project type.' - ).format( - picking=self.picking_id.name, - project=project.display_name, - )) - - if not project.project_type_id.wip_account_id: - raise ValidationError(_( - 'The transfer {picking} can not be processed because ' - 'the project type {project_type} has no WIP account.' - ).format( - picking=self.picking_id.name, - project_type=project.project_type_id.display_name, - )) - - def _get_wip_account(self): - return self.project_id.project_type_id.wip_account_id - - def _get_project_analytic_account(self): - return self.project_id.analytic_account_id diff --git a/.unported/project_wip_material/static/description/analytic_line_list.png b/.unported/project_wip_material/static/description/analytic_line_list.png deleted file mode 100644 index adcc556c..00000000 Binary files a/.unported/project_wip_material/static/description/analytic_line_list.png and /dev/null differ diff --git a/.unported/project_wip_material/static/description/general_ledger_analytic_filter.png b/.unported/project_wip_material/static/description/general_ledger_analytic_filter.png deleted file mode 100644 index e0206eee..00000000 Binary files a/.unported/project_wip_material/static/description/general_ledger_analytic_filter.png and /dev/null differ diff --git a/.unported/project_wip_material/static/description/icon.png b/.unported/project_wip_material/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_wip_material/static/description/icon.png and /dev/null differ diff --git a/.unported/project_wip_material/tests/__init__.py b/.unported/project_wip_material/tests/__init__.py deleted file mode 100644 index 6ef2df91..00000000 --- a/.unported/project_wip_material/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_wip_material/tests/common.py b/.unported/project_wip_material/tests/common.py deleted file mode 100644 index 3f59cba9..00000000 --- a/.unported/project_wip_material/tests/common.py +++ /dev/null @@ -1,65 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.addons.project_material.tests.common import TaskMaterialCase - - -class ProjectWIPMaterialCase(TaskMaterialCase): - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.manager.groups_id |= cls.env.ref('account.group_account_manager') - - cls.journal = cls.env['account.journal'].create({ - 'name': 'Stock Journal', - 'type': 'general', - 'code': 'STOCK', - 'company_id': cls.company.id, - }) - - cls.stock_account = cls.env['account.account'].create({ - 'name': 'Raw Material Stocks', - 'code': '130101', - 'user_type_id': cls.env.ref('account.data_account_type_non_current_assets').id, - 'company_id': cls.company.id, - }) - - cls.input_account = cls.env['account.account'].create({ - 'name': 'Stock Received / Not Invoiced', - 'code': '230102', - 'user_type_id': cls.env.ref('account.data_account_type_non_current_assets').id, - 'company_id': cls.company.id, - }) - - cls.output_account = cls.env['account.account'].create({ - 'name': 'Stock Delivered / Not Invoiced', - 'code': '130102', - 'user_type_id': cls.env.ref('account.data_account_type_non_current_assets').id, - 'company_id': cls.company.id, - }) - - cls.wip_account = cls.env['account.account'].create({ - 'name': 'Work In Progress', - 'code': '140101', - 'user_type_id': cls.env.ref('account.data_account_type_non_current_assets').id, - 'reconcile': True, - 'company_id': cls.company.id, - }) - - cls.project_type = cls.env['project.type'].create({ - 'name': 'Trailer Refurb', - 'wip_account_id': cls.wip_account.id, - }) - cls.project.project_type_id = cls.project_type - - cls.product_category.write({ - 'property_valuation': 'real_time', - 'property_stock_journal': cls.journal.id, - 'property_stock_valuation_account_id': cls.stock_account.id, - 'property_stock_account_input_categ_id': cls.input_account.id, - 'property_stock_account_output_categ_id': cls.output_account.id, - }) - - new_context = dict(cls.env.context, apply_project_wip_material_constraints=True) - cls.env = cls.env(context=new_context) diff --git a/.unported/project_wip_material/tests/test_wip_journal_entries.py b/.unported/project_wip_material/tests/test_wip_journal_entries.py deleted file mode 100644 index 63c5f823..00000000 --- a/.unported/project_wip_material/tests/test_wip_journal_entries.py +++ /dev/null @@ -1,138 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import pytest -from odoo.exceptions import ValidationError -from .common import ProjectWIPMaterialCase - - -class TestConsumptionJournalEntryConstraints(ProjectWIPMaterialCase): - - def test_if_project_has_no_type__constraint_raised_on_task_material(self): - self.project.project_type_id = False - with pytest.raises(ValidationError): - self._create_material_line() - - def test_if_project_type_has_no_wip_account__constraint_raised_on_task_material(self): - self.project_type.wip_account_id = False - with pytest.raises(ValidationError): - self._create_material_line() - - def test_if_project_has_no_type__constraint_raised_on_transfer(self): - self.move = self._create_material_line().move_ids - self.project.project_type_id = False - with pytest.raises(ValidationError): - self._force_transfer_move(self.move) - - def test_if_project_type_has_no_wip_account__constraint_raised_on_transfer(self): - self.move = self._create_material_line().move_ids - self.project_type.wip_account_id = False - with pytest.raises(ValidationError): - self._force_transfer_move(self.move) - - -class TestConsumptionJournalEntry(ProjectWIPMaterialCase): - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.move = cls._create_material_line(initial_qty=10).move_ids - cls._force_transfer_move(cls.move) - cls.account_move = cls.move.account_move_ids - cls.debit_line = cls.account_move.line_ids.filtered(lambda l: l.debit) - cls.credit_line = cls.account_move.line_ids.filtered(lambda l: l.credit) - cls.expected_value = 500 # 50 * 10 (product_a_value * initial_qty) - - def test_debit_account_is_wip(self): - assert self.debit_line.account_id == self.wip_account - - def test_credit_account_is_inventory_valuation(self): - assert self.credit_line.account_id == self.stock_account - - def test_debit_analytic_account_is_project(self): - assert self.debit_line.analytic_account_id == self.project.analytic_account_id - - def test_debit_task_is_set(self): - assert self.debit_line.task_id == self.task - - def test_credit_has_no_analytic_account(self): - assert not self.credit_line.analytic_account_id - - def test_credit_has_no_task(self): - assert not self.credit_line.task_id - - def test_product_propagated_to_account_move(self): - assert self.debit_line.product_id == self.product_a - assert self.credit_line.product_id == self.product_a - - def test_move_line_ref_is_picking_name(self): - assert self.debit_line.ref == self.move.picking_id.name - assert self.credit_line.ref == self.move.picking_id.name - - def test_one_analytic_line_created_for_debit(self): - assert len(self.debit_line.analytic_line_ids) == 1 - - def test_anayltic_line_has_origin_task(self): - assert self.debit_line.analytic_line_ids.origin_task_id == self.task - - def test_no_analytic_line_created_for_credit(self): - assert not self.credit_line.analytic_line_ids - - def test_one_analytic_amount_is_move_value(self): - assert self.debit_line.analytic_line_ids.amount == -self.expected_value - - -class TestConsumptionReturnJournalEntry(ProjectWIPMaterialCase): - """Test the journal entry generated from a consumption return. - - The expected behavior is the opposite from a consumption journal entry. - """ - - @classmethod - def setUpClass(cls): - super().setUpClass() - initial_move = cls._create_material_line(initial_qty=10).move_ids - cls._force_transfer_move(initial_move) - cls.move = cls._return_stock_move(initial_move, 10) - cls.account_move = cls.move.account_move_ids - cls.debit_line = cls.account_move.line_ids.filtered(lambda l: l.debit) - cls.credit_line = cls.account_move.line_ids.filtered(lambda l: l.credit) - cls.expected_value = 500 # 50 * 10 (product_a_value * initial_qty) - - def test_credit_account_is_wip(self): - assert self.credit_line.account_id == self.wip_account - - def test_debit_account_is_inventory_valuation(self): - assert self.debit_line.account_id == self.stock_account - - def test_credit_analytic_account_is_project(self): - assert self.credit_line.analytic_account_id == self.project.analytic_account_id - - def test_credit_task_is_set(self): - assert self.credit_line.task_id == self.task - - def test_debit_has_no_analytic_account(self): - assert not self.debit_line.analytic_account_id - - def test_debit_has_no_task(self): - assert not self.debit_line.task_id - - def test_product_propagated_to_account_move(self): - assert self.credit_line.product_id == self.product_a - assert self.debit_line.product_id == self.product_a - - def test_move_line_ref_is_picking_name(self): - assert self.credit_line.ref == self.move.picking_id.name - assert self.debit_line.ref == self.move.picking_id.name - - def test_one_analytic_line_created_for_credit(self): - assert len(self.credit_line.analytic_line_ids) == 1 - - def test_anayltic_line_has_origin_task(self): - assert self.credit_line.analytic_line_ids.origin_task_id == self.task - - def test_no_analytic_line_created_for_debit(self): - assert not self.debit_line.analytic_line_ids - - def test_one_analytic_amount_is_move_value(self): - assert self.credit_line.analytic_line_ids.amount == self.expected_value diff --git a/.unported/project_wip_outsourcing/README.rst b/.unported/project_wip_outsourcing/README.rst deleted file mode 100644 index c4eb6b20..00000000 --- a/.unported/project_wip_outsourcing/README.rst +++ /dev/null @@ -1,35 +0,0 @@ -Project WIP Outsourcing -======================= - -.. contents:: Table of Contents - -Context -------- -In the context of a company using a `Work In Progress` account to capitalize expenses, -an outsourcing supplier invoice should be recognized in a WIP account. - -Summary -------- -This module automatically sets the WIP account from the project type on an outsourcing invoice line. - -Configuration -------------- -As member of the group `Project / Manager`, In the form view of a project type, I fill the WIP account. - -.. image:: static/description/project_form.png - -.. image:: static/description/project_type_form.png - -Usage ------ -As member of the group `Purchase / User`, I create and validate an outsourcing PO. - -.. image:: static/description/purchase_order_form.png - -I create an invoice from the PO. I notice that the WIP account from the project type was set on the invoice line. - -.. image:: static/description/invoice_form.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_wip_outsourcing/__init__.py b/.unported/project_wip_outsourcing/__init__.py deleted file mode 100644 index 6da4fa4e..00000000 --- a/.unported/project_wip_outsourcing/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_wip_outsourcing/__manifest__.py b/.unported/project_wip_outsourcing/__manifest__.py deleted file mode 100644 index 6b306c51..00000000 --- a/.unported/project_wip_outsourcing/__manifest__.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project WIP Outsourcing', - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'summary': 'Generate WIP journal entries from purchase orders', - 'depends': [ - 'project_wip', - 'project_outsourcing', - 'purchase', - ], - 'installable': True, -} diff --git a/.unported/project_wip_outsourcing/models/__init__.py b/.unported/project_wip_outsourcing/models/__init__.py deleted file mode 100644 index 3d380f8e..00000000 --- a/.unported/project_wip_outsourcing/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import account_invoice, account_invoice_line diff --git a/.unported/project_wip_outsourcing/models/account_invoice.py b/.unported/project_wip_outsourcing/models/account_invoice.py deleted file mode 100644 index 202b5487..00000000 --- a/.unported/project_wip_outsourcing/models/account_invoice.py +++ /dev/null @@ -1,26 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models - - -class AccountInvoice(models.Model): - """Select the WIP account on invoice lines for outsourcing. - - If the invoice line is linked to an outsourcing PO line, - the WIP account is automatically selected. - - The WIP account is taken from the project type. - If the project type has no WIP account, the standard account is used. - """ - - _inherit = "account.invoice" - - def _prepare_invoice_line_from_po_line(self, line): - result = super()._prepare_invoice_line_from_po_line(line) - if line.is_outsourcing: - project = line.order_id.project_id - wip_account = project.project_type_id.wip_account_id - if wip_account: - result["account_id"] = wip_account.id - return result diff --git a/.unported/project_wip_outsourcing/models/account_invoice_line.py b/.unported/project_wip_outsourcing/models/account_invoice_line.py deleted file mode 100644 index f3f979ef..00000000 --- a/.unported/project_wip_outsourcing/models/account_invoice_line.py +++ /dev/null @@ -1,21 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models - - -class AccountInvoiceLine(models.Model): - - _inherit = "account.invoice.line" - - def _get_outsourcing_wip_account(self): - return self.purchase_id.project_id.project_type_id.wip_account_id - - @api.onchange("product_id") - def _onchange_product_id(self): - result = super()._onchange_product_id() - if self.is_outsourcing: - wip_account = self._get_outsourcing_wip_account() - if wip_account: - self.account_id = wip_account - return result diff --git a/.unported/project_wip_outsourcing/static/description/icon.png b/.unported/project_wip_outsourcing/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_wip_outsourcing/static/description/icon.png and /dev/null differ diff --git a/.unported/project_wip_outsourcing/static/description/invoice_form.png b/.unported/project_wip_outsourcing/static/description/invoice_form.png deleted file mode 100644 index 6dfab8d6..00000000 Binary files a/.unported/project_wip_outsourcing/static/description/invoice_form.png and /dev/null differ diff --git a/.unported/project_wip_outsourcing/static/description/project_form.png b/.unported/project_wip_outsourcing/static/description/project_form.png deleted file mode 100644 index 26f6fa62..00000000 Binary files a/.unported/project_wip_outsourcing/static/description/project_form.png and /dev/null differ diff --git a/.unported/project_wip_outsourcing/static/description/project_type_form.png b/.unported/project_wip_outsourcing/static/description/project_type_form.png deleted file mode 100644 index d9cc7942..00000000 Binary files a/.unported/project_wip_outsourcing/static/description/project_type_form.png and /dev/null differ diff --git a/.unported/project_wip_outsourcing/static/description/purchase_order_form.png b/.unported/project_wip_outsourcing/static/description/purchase_order_form.png deleted file mode 100644 index 9b45b9de..00000000 Binary files a/.unported/project_wip_outsourcing/static/description/purchase_order_form.png and /dev/null differ diff --git a/.unported/project_wip_outsourcing/tests/__init__.py b/.unported/project_wip_outsourcing/tests/__init__.py deleted file mode 100644 index 6ef2df91..00000000 --- a/.unported/project_wip_outsourcing/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_wip_outsourcing/tests/test_purchase_order.py b/.unported/project_wip_outsourcing/tests/test_purchase_order.py deleted file mode 100644 index 94e52ecd..00000000 --- a/.unported/project_wip_outsourcing/tests/test_purchase_order.py +++ /dev/null @@ -1,54 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo.addons.project_outsourcing.tests.common import OutsourcingCase - - -class TestOutsourcingPurchaseOrder(OutsourcingCase): - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.wip_account = cls.env['account.account'].create({ - 'name': 'Work In Progress', - 'code': '140102', - 'user_type_id': cls.env.ref('account.data_account_type_non_current_assets').id, - 'reconcile': True, - 'company_id': cls.env.user.company_id.id, - }) - cls.project_type = cls.env['project.type'].create({ - 'name': 'Manufacture', - 'wip_account_id': cls.wip_account.id, - }) - cls.project.project_type_id = cls.project_type - cls.order.button_confirm() - cls.invoice = cls.env['account.invoice'].create({ - 'partner_id': cls.supplier.id, - 'type': 'in_invoice', - }) - cls.expense_account = cls.env['account.account'].create({ - 'name': 'Expenses', - 'code': '510101', - 'user_type_id': cls.env.ref('account.data_account_type_expenses').id, - 'company_id': cls.env.user.company_id.id, - }) - cls.product.property_account_expense_id = cls.expense_account - - def test_wip_account_propagated_to_invoice_line(self): - values = self.invoice._prepare_invoice_line_from_po_line(self.order.order_line) - assert values['account_id'] == self.wip_account.id - - def test_if_no_wip_account__default_account_propagated_to_invoice_line(self): - self.project_type.wip_account_id = False - values = self.invoice._prepare_invoice_line_from_po_line(self.order.order_line) - assert values['account_id'] == self.expense_account.id - - def test_on_change_product__wip_account_propagated(self): - values = self.invoice._prepare_invoice_line_from_po_line(self.order.order_line) - invoice_line = self.env['account.invoice.line'].create(values) - - with self.env.do_in_onchange(): - invoice_line.account_id = False - invoice_line.product_id = self.product - invoice_line._onchange_product_id() - assert invoice_line.account_id == self.wip_account diff --git a/.unported/project_wip_supply_cost/README.rst b/.unported/project_wip_supply_cost/README.rst deleted file mode 100644 index e463868b..00000000 --- a/.unported/project_wip_supply_cost/README.rst +++ /dev/null @@ -1,81 +0,0 @@ -Project WIP Supply Cost -======================= -This module extends the project_wip (Project Work in Progress) module. - -It allows to generate journal entries for indirect costs (supply cost) from timesheet lines. - -.. contents:: Table of Contents - -Configuration -------------- -As member of the group ``Project / Manager``, I go to the form view of a project type. - -I notice a new section ``Indirect Costs`` with the following fields: - -* Expense Account - -.. - - The counter-part account to use for the shop supply entries. - -* Journal - -.. - - The journal to use for the shop supply entries. - -* Hourly Rate - -.. - - The hourly rate to apply. - - The shop supply entry for a timesheet has an amount equal to ``Number of Hours`` x ``Hourly Rate``. - -.. image:: static/description/project_type.png - -When the field ``Expense Account`` is filed, a shop supply entry will be created for each new timesheet line under the project type. - -Usage ------ -As member of the group `Project / User`, I go to the form view of a task. - -I add a timesheet line. - -.. image:: static/description/task_form.png - -Journal Entries -~~~~~~~~~~~~~~~ -As member of the group `Accounting / Billing`, I go to the general ledger and filter to see only entries for my project. - -I see one entry for my timesheet line. - -.. image:: static/description/general_ledger_filtered.png - -The amount of 6.25 USD represents 25 minutes (0.417 hours) x 15 USD (timesheet cost). - -Analytic Lines -~~~~~~~~~~~~~~ -I go to the list of analytic lines and I filter to see only entries for my project. - -I notice that 2 analytic line were generated for my timesheet line. - -.. image:: static/description/analytic_lines_filtered.png - -The first line is the shop supply (6.25 USD). - -The second line is the timesheet line itself. -Note that the amount is 0.00 USD. The reason is that the timesheet cost was not defined on the employee. - -Deleting / Updating Timesheets ------------------------------- -When deleting or updating a timesheet line, the behavior is equivalent as with the module ``project_wip_timesheet``. - -The shop supply journal entries and analytic lines are resersed / updated in cascade. - -If however, the WIP entry was already transfered to the cost of goods sold, then deleting or updating -the timesheet line will be blocked. - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_wip_supply_cost/__init__.py b/.unported/project_wip_supply_cost/__init__.py deleted file mode 100644 index 6da4fa4e..00000000 --- a/.unported/project_wip_supply_cost/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_wip_supply_cost/__manifest__.py b/.unported/project_wip_supply_cost/__manifest__.py deleted file mode 100644 index c121c792..00000000 --- a/.unported/project_wip_supply_cost/__manifest__.py +++ /dev/null @@ -1,22 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project WIP Supply Cost', - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'summary': 'Generate indirect cost entries from timesheets', - 'depends': [ - 'project_wip', - 'project_task_analytic_lines', - 'hr_timesheet', - ], - 'data': [ - 'views/project_type.xml', - ], - 'installable': True, -} diff --git a/.unported/project_wip_supply_cost/i18n/fr.po b/.unported/project_wip_supply_cost/i18n/fr.po deleted file mode 100644 index 9b146c2e..00000000 --- a/.unported/project_wip_supply_cost/i18n/fr.po +++ /dev/null @@ -1,161 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_wip_supply_cost -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-09 15:31+0000\n" -"PO-Revision-Date: 2020-12-09 10:33-0500\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.0.6\n" - -#. module: project_wip_supply_cost -#: model:ir.model.fields,help:project_wip_supply_cost.field_project_type__shop_supply_account_id -msgid "" -"Account used as counter-part (usually the credit part) in shop supply " -"entries." -msgstr "" -"Compte comme contre-partie (habituellement au crédit) dans les écritures de " -"matériel." - -#. module: project_wip_supply_cost -#: model:ir.model,name:project_wip_supply_cost.model_account_analytic_line -msgid "Analytic Line" -msgstr "" - -#. module: project_wip_supply_cost -#: model_terms:ir.ui.view,arch_db:project_wip_supply_cost.project_type_form_with_shop_supply -msgid "Expense Account" -msgstr "Compte de dépense" - -#. module: project_wip_supply_cost -#: model_terms:ir.ui.view,arch_db:project_wip_supply_cost.project_type_form_with_shop_supply -msgid "Hourly Rate" -msgstr "Taux horaire" - -#. module: project_wip_supply_cost -#: code:addons/project_wip_supply_cost/models/project_type.py:45 -#, python-format -msgid "" -"If the shop supply account is filled for a project type, the salary journal " -"must be filled as well." -msgstr "" -"Si le compte de matériel est saisi sur le type de projet le journal de " -"matériel doit être saisi également." - -#. module: project_wip_supply_cost -#: code:addons/project_wip_supply_cost/models/project_type.py:39 -#, python-format -msgid "" -"If the shop supply account is filled for a project type, the work in " -"progress account must be filled as well." -msgstr "" -"Si le compte de matériel est saisi sur le type de projet le compte de " -"travaux en cours doit être saisi également." - -#. module: project_wip_supply_cost -#: model:ir.model.fields,field_description:project_wip_supply_cost.field_account_analytic_line__is_shop_supply -#: model:ir.model.fields,field_description:project_wip_supply_cost.field_account_move_line__is_shop_supply -msgid "Is Shop Supply" -msgstr "Est une ligne de matériel" - -#. module: project_wip_supply_cost -#: model_terms:ir.ui.view,arch_db:project_wip_supply_cost.project_type_form_with_shop_supply -msgid "Journal" -msgstr "Journal" - -#. module: project_wip_supply_cost -#: model:ir.model,name:project_wip_supply_cost.model_account_move_line -msgid "Journal Item" -msgstr "" - -#. module: project_wip_supply_cost -#: model:ir.model.fields,help:project_wip_supply_cost.field_project_type__shop_supply_journal_id -msgid "Journal used for reporting shop supply entries." -msgstr "Journal utilisé pour reporter les écritures de matériel." - -#. module: project_wip_supply_cost -#: model:ir.model,name:project_wip_supply_cost.model_project_type -msgid "Project Type" -msgstr "Type de projet" - -#. module: project_wip_supply_cost -#: model_terms:ir.ui.view,arch_db:project_wip_supply_cost.project_type_form_with_shop_supply -msgid "Shop Supply" -msgstr "Matériel" - -#. module: project_wip_supply_cost -#: model:ir.model.fields,field_description:project_wip_supply_cost.field_project_type__shop_supply_account_id -msgid "Shop Supply Account" -msgstr "Compte de matériel" - -#. module: project_wip_supply_cost -#: model:ir.model.fields,field_description:project_wip_supply_cost.field_account_analytic_line__shop_supply_account_move_id -msgid "Shop Supply Entry" -msgstr "Entrée comptable de matériel" - -#. module: project_wip_supply_cost -#: model:ir.model.fields,field_description:project_wip_supply_cost.field_project_type__shop_supply_journal_id -msgid "Shop Supply Journal" -msgstr "Journal de matériel" - -#. module: project_wip_supply_cost -#: model:ir.model.fields,field_description:project_wip_supply_cost.field_project_type__shop_supply_rate -msgid "Shop Supply Rate" -msgstr "Taux du matériel" - -#. module: project_wip_supply_cost -#: model:ir.model.fields,help:project_wip_supply_cost.field_project_type__shop_supply_rate -msgid "The rate to apply for shop supply entries." -msgstr "Le taux à appliquer pour les écritures de matériel." - -#. module: project_wip_supply_cost -#: code:addons/project_wip_supply_cost/models/account_analytic_line.py:108 -#, python-format -msgid "" -"The timesheet line {description} can not be deleted because the shop supply " -"entry ({move_name}) is already transfered into the cost of goods sold." -msgstr "" -"La ligne de feuille de temps {description} ne peut pas être supprimée, car " -"l'écriture de matériel ({move_name}) est déjà transférée dans le coût des " -"marchandises vendues." - -#. module: project_wip_supply_cost -#: code:addons/project_wip_supply_cost/models/account_analytic_line.py:89 -#, python-format -msgid "" -"The timesheet line {description} can not be updated because the shop supply " -"entry ({move_name}) is already transfered into the cost of goods sold." -msgstr "" -"La ligne de feuille de temps {description} ne peut pas être mise à jour, car " -"l'écriture de matériel ({move_name}) est déjà transférée dans le coût des " -"marchandises vendues." - -#. module: project_wip_supply_cost -#: code:addons/project_wip_supply_cost/models/account_analytic_line.py:123 -#, python-format -msgid "" -"The timesheet line {description} can not be updated because the shop supply " -"entry ({move_name}) would be reversed. This journal entry was already " -"transfered into the cost of goods sold." -msgstr "" -"La ligne de feuille de temps {description} ne peut pas être mise à jour, car " -"l'écriture de matériel ({move_name}) serait renversée. Cette écriture est " -"déjà transférée dans le coût des marchandises vendues." - -#. module: project_wip_supply_cost -#: code:addons/project_wip_supply_cost/models/account_analytic_line.py:207 -#, python-format -msgid "{project} / TA#{task} (Shop Supply)" -msgstr "{project} / TA#{task} (Matériel)" - -#~ msgid "(task: {})" -#~ msgstr "(tâche: {})" diff --git a/.unported/project_wip_supply_cost/models/__init__.py b/.unported/project_wip_supply_cost/models/__init__.py deleted file mode 100644 index 9f0e9268..00000000 --- a/.unported/project_wip_supply_cost/models/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import ( - account_analytic_line, - account_move_line, - project_type, -) diff --git a/.unported/project_wip_supply_cost/models/account_analytic_line.py b/.unported/project_wip_supply_cost/models/account_analytic_line.py deleted file mode 100644 index 9bfd2629..00000000 --- a/.unported/project_wip_supply_cost/models/account_analytic_line.py +++ /dev/null @@ -1,232 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models, _ -from odoo.exceptions import ValidationError - - -class AnalyticLine(models.Model): - - _inherit = "account.analytic.line" - - is_shop_supply = fields.Boolean() - - shop_supply_account_move_id = fields.Many2one( - "account.move", "Shop Supply Entry", ondelete="restrict" - ) - - @api.model - def create(self, vals): - """On timesheet create, create or update the wip journal entry. - - Because the creation of a timesheet is complex, the journal entry - may be created by a write before the return of super().create(vals). - """ - line = super().create(vals) - if line._requires_shop_supply_move(): - line.sudo()._create_update_or_reverse_shop_supply_move() - return line - - @api.multi - def write(self, vals): - """When updating an analytic line, create / update / delete the wip entry. - - Whether the wip entry must be created / updated / deleted depends - on which field is written to. This prevents an infinite loop. - """ - super().write(vals) - - fields_to_check = self._get_shop_supply_move_dependent_fields() - if fields_to_check.intersection(vals): - for line in self: - line.sudo()._create_update_or_reverse_shop_supply_move() - - return True - - @api.multi - def unlink(self): - """Reverse the salary account move entry when a timesheet line is deleted.""" - lines_with_moves = self.filtered(lambda l: l.shop_supply_account_move_id) - for line in lines_with_moves: - line.sudo()._reverse_shop_supply_account_move_for_deleted_timesheet() - return super().unlink() - - def _create_update_or_reverse_shop_supply_move(self): - """Create / Update / Reverse the wip account move. - - Depending on the status of the timesheet line, - the wip move is either created, updated or reversed. - """ - must_create_shop_supply_move = ( - self._requires_shop_supply_move() and not self.shop_supply_account_move_id - ) - must_update_shop_supply_move = ( - self._requires_shop_supply_move() and self.shop_supply_account_move_id - ) - must_reverse_shop_supply_move = ( - not self._requires_shop_supply_move() and self.shop_supply_account_move_id - ) - - if must_create_shop_supply_move: - self._create_shop_supply_move() - - elif must_update_shop_supply_move: - self._update_shop_supply_move() - - elif must_reverse_shop_supply_move: - self._reverse_shop_supply_account_move_for_updated_timesheet() - - def _create_shop_supply_move(self): - """Create the wip journal entry.""" - vals = self._get_shop_supply_move_vals() - self.shop_supply_account_move_id = self.env["account.move"].create(vals) - self.shop_supply_account_move_id.post() - - def _update_shop_supply_move(self): - """Update the wip journal entry.""" - if self._is_shop_supply_account_move_reconciled(): - raise ValidationError( - _( - "The timesheet line {description} can not " - "be updated because the shop supply entry ({move_name}) is already " - "transfered into the cost of goods sold." - ).format( - description=self._get_wip_timesheet_line_description(), - move_name=self.shop_supply_account_move_id.name, - ) - ) - - self.shop_supply_account_move_id.state = "draft" - vals = self._get_shop_supply_move_vals() - self.shop_supply_account_move_id.write(vals) - self.shop_supply_account_move_id.post() - - def _reverse_shop_supply_account_move_for_deleted_timesheet(self): - """Reverse the wip journal entry in the context of a deleted timesheet.""" - if self._is_shop_supply_account_move_reconciled(): - raise ValidationError( - _( - "The timesheet line {description} can not " - "be deleted because the shop supply entry ({move_name}) is already " - "transfered into the cost of goods sold." - ).format( - description=self._get_wip_timesheet_line_description(), - move_name=self.shop_supply_account_move_id.name, - ) - ) - self.shop_supply_account_move_id.reverse_moves() - - def _reverse_shop_supply_account_move_for_updated_timesheet(self): - """Reverse the wip journal entry in the context of an updated timesheet.""" - if self._is_shop_supply_account_move_reconciled(): - raise ValidationError( - _( - "The timesheet line {description} can not " - "be updated because the shop supply entry ({move_name}) would be " - "reversed. This journal entry was already transfered into " - "the cost of goods sold." - ).format( - description=self._get_wip_timesheet_line_description(), - move_name=self.shop_supply_account_move_id.name, - ) - ) - self.shop_supply_account_move_id.reverse_moves() - self.shop_supply_account_move_id = False - - def _requires_shop_supply_move(self): - """Evaluate whether the timesheet line requires a shop supply entry. - - The shop supply account must be defined on the project type and - as well as the shop supply rate. - - :rtype: bool - """ - return ( - self._get_shop_supply_amount() - and bool(self._get_shop_supply_account()) - and self._get_shop_supply_rate() - ) - - def _get_shop_supply_wip_move_line_vals(self): - """Get the values for the wip move line (usually the debit). - - :rtype: dict - """ - amount = self._get_shop_supply_amount() - return { - "account_id": self._get_wip_account().id, - "name": self.name, - "debit": amount if amount > 0 else 0, - "credit": -amount if amount < 0 else 0, - "quantity": self.unit_amount, - "analytic_account_id": self.project_id.analytic_account_id.id, - "is_shop_supply": True, - "task_id": self.task_id.id, - } - - def _get_shop_supply_move_line_vals(self): - """Get the values for the shop supply move line (usually the credit). - - :rtype: dict - """ - amount = self._get_shop_supply_amount() - return { - "account_id": self._get_shop_supply_account().id, - "name": self.name, - "debit": -amount if amount < 0 else 0, - "credit": amount if amount > 0 else 0, - "quantity": self.unit_amount, - } - - def _get_shop_supply_amount(self): - """Get the debit/credit amount for the shop supply entry. - - :rtype: float - """ - return self.unit_amount * self._get_shop_supply_rate() - - def _get_shop_supply_move_vals(self): - """Get the values for the wip account move. - - :rtype: dict - """ - return { - "company_id": self.company_id.id, - "journal_id": self._get_shop_supply_journal().id, - "date": self.date, - "no_analytic_lines": False, - "ref": self._get_shop_supply_move_reference(), - "line_ids": [ - (5, 0), - (0, 0, self._get_shop_supply_wip_move_line_vals()), - (0, 0, self._get_shop_supply_move_line_vals()), - ], - } - - def _get_shop_supply_move_reference(self): - return _("{project} / TA#{task} (Shop Supply)").format( - project=self.project_id.display_name, task=self.task_id.id - ) - - def _is_shop_supply_account_move_reconciled(self): - """Evaluate whether the wip journal entry is reconciled or not. - - :rtype: bool - """ - return any(l.reconciled for l in self.shop_supply_account_move_id.line_ids) - - def _get_shop_supply_move_dependent_fields(self): - """Get the fields that trigger an update of the wip entry. - - :rtype: Set - """ - return {"name", "unit_amount", "date", "project_id", "task_id"} - - def _get_shop_supply_journal(self): - return self.project_id.project_type_id.shop_supply_journal_id - - def _get_shop_supply_account(self): - return self.project_id.project_type_id.shop_supply_account_id - - def _get_shop_supply_rate(self): - return self.project_id.project_type_id.shop_supply_rate diff --git a/.unported/project_wip_supply_cost/models/account_move_line.py b/.unported/project_wip_supply_cost/models/account_move_line.py deleted file mode 100644 index 68659c64..00000000 --- a/.unported/project_wip_supply_cost/models/account_move_line.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import fields, models - - -class AccountMoveLine(models.Model): - - _inherit = 'account.move.line' - - is_shop_supply = fields.Boolean() - - def create_analytic_lines(self): - result = super().create_analytic_lines() - - shop_supply_lines = self.filtered(lambda l: l.is_shop_supply) - shop_supply_lines.mapped('analytic_line_ids').write({'is_shop_supply': True}) - - return result diff --git a/.unported/project_wip_supply_cost/models/project_type.py b/.unported/project_wip_supply_cost/models/project_type.py deleted file mode 100644 index 829ee1b7..00000000 --- a/.unported/project_wip_supply_cost/models/project_type.py +++ /dev/null @@ -1,48 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models, _ -from odoo.exceptions import ValidationError - - -class ProjectType(models.Model): - """Add the salary account to project types.""" - - _inherit = 'project.type' - - shop_supply_journal_id = fields.Many2one( - 'account.journal', - 'Shop Supply Journal', - company_dependent=True, - help='Journal used for reporting shop supply entries.', - ) - - shop_supply_account_id = fields.Many2one( - 'account.account', - 'Shop Supply Account', - company_dependent=True, - help='Account used as counter-part (usually the credit part) in shop supply entries.', - ) - - shop_supply_rate = fields.Float( - 'Shop Supply Rate', - default=0, - company_dependent=True, - help='The rate to apply for shop supply entries.', - ) - - @api.constrains('shop_supply_account_id', 'shop_supply_journal_id', 'wip_account_id') - def _check_required_fields_for_shop_supply(self): - project_types_with_shop_supply = self.filtered(lambda t: t.shop_supply_account_id) - for project_type in project_types_with_shop_supply: - if not project_type.wip_account_id: - raise ValidationError(_( - 'If the shop supply account is filled for a project type, ' - 'the work in progress account must be filled as well.' - )) - - if not project_type.shop_supply_journal_id: - raise ValidationError(_( - 'If the shop supply account is filled for a project type, ' - 'the salary journal must be filled as well.' - )) diff --git a/.unported/project_wip_supply_cost/static/description/analytic_lines_filtered.png b/.unported/project_wip_supply_cost/static/description/analytic_lines_filtered.png deleted file mode 100644 index df080688..00000000 Binary files a/.unported/project_wip_supply_cost/static/description/analytic_lines_filtered.png and /dev/null differ diff --git a/.unported/project_wip_supply_cost/static/description/general_ledger_filtered.png b/.unported/project_wip_supply_cost/static/description/general_ledger_filtered.png deleted file mode 100644 index 6750513f..00000000 Binary files a/.unported/project_wip_supply_cost/static/description/general_ledger_filtered.png and /dev/null differ diff --git a/.unported/project_wip_supply_cost/static/description/icon.png b/.unported/project_wip_supply_cost/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_wip_supply_cost/static/description/icon.png and /dev/null differ diff --git a/.unported/project_wip_supply_cost/static/description/project_type.png b/.unported/project_wip_supply_cost/static/description/project_type.png deleted file mode 100644 index 77559207..00000000 Binary files a/.unported/project_wip_supply_cost/static/description/project_type.png and /dev/null differ diff --git a/.unported/project_wip_supply_cost/static/description/task_form.png b/.unported/project_wip_supply_cost/static/description/task_form.png deleted file mode 100644 index 024f21ad..00000000 Binary files a/.unported/project_wip_supply_cost/static/description/task_form.png and /dev/null differ diff --git a/.unported/project_wip_supply_cost/tests/__init__.py b/.unported/project_wip_supply_cost/tests/__init__.py deleted file mode 100644 index 6ef2df91..00000000 --- a/.unported/project_wip_supply_cost/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_wip_supply_cost/tests/test_wip_journal_entries.py b/.unported/project_wip_supply_cost/tests/test_wip_journal_entries.py deleted file mode 100644 index 4bde468a..00000000 --- a/.unported/project_wip_supply_cost/tests/test_wip_journal_entries.py +++ /dev/null @@ -1,339 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import pytest -from datetime import datetime, timedelta -from odoo import fields -from odoo.tests import common -from odoo.exceptions import ValidationError - - -class WIPJournalEntriesCase(common.SavepointCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.company = cls.env["res.company"].create({"name": "Test Company"}) - cls.manager = cls.env["res.users"].create( - { - "name": "Manager", - "login": "manager", - "email": "manager@test.com", - "groups_id": [(4, cls.env.ref("project.group_project_manager").id)], - "company_id": cls.company.id, - "company_ids": [(4, cls.company.id)], - } - ) - - cls.timesheet_user = cls.env["res.users"].create( - { - "name": "Timesheet User", - "login": "timesheet_user@example.com", - "email": "timesheet_user@example.com", - "groups_id": [ - (4, cls.env.ref("hr_timesheet.group_hr_timesheet_user").id) - ], - "company_id": cls.company.id, - "company_ids": [(4, cls.company.id)], - } - ) - - cls.employee = cls.env["hr.employee"].create( - { - "name": "Timesheet User", - "user_id": cls.timesheet_user.id, - "company_id": cls.company.id, - } - ) - - cls.shop_supply_journal = cls.env["account.journal"].create( - { - "name": "Shop Supply To WIP", - "code": "SHOP", - "type": "general", - "company_id": cls.company.id, - } - ) - - cls.cgs_journal = cls.env["account.journal"].create( - { - "name": "Work in Progress", - "code": "WIP", - "update_posted": True, - "type": "general", - "company_id": cls.company.id, - } - ) - - cls.wip_account = cls.env["account.account"].create( - { - "name": "Work In Progress", - "code": "140101", - "user_type_id": cls.env.ref( - "account.data_account_type_non_current_assets" - ).id, - "reconcile": True, - "company_id": cls.company.id, - } - ) - - cls.cgs_account = cls.env["account.account"].create( - { - "name": "Cost of Goods Sold", - "code": "510101", - "user_type_id": cls.env.ref("account.data_account_type_expenses").id, - "company_id": cls.company.id, - } - ) - - cls.shop_supply_account = cls.env["account.account"].create( - { - "name": "Shop Supply", - "code": "510201", - "user_type_id": cls.env.ref("account.data_account_type_expenses").id, - "company_id": cls.company.id, - } - ) - - cls.env = cls.env(user=cls.manager, context={"force_company": cls.company.id}) - - cls.env["project.project"].create( - {"name": "Job 123", "company_id": cls.company.id} - ) - - cls.shop_supply_rate = 15 - cls.project_type = cls.env["project.type"].create( - { - "name": "Trailer Refurb", - "wip_account_id": cls.wip_account.id, - "shop_supply_journal_id": cls.shop_supply_journal.id, - "shop_supply_account_id": cls.shop_supply_account.id, - "shop_supply_rate": cls.shop_supply_rate, - "cgs_account_id": cls.cgs_account.id, - "cgs_journal_id": cls.cgs_journal.id, - } - ) - - cls.project = cls.env["project.project"].create( - { - "name": "Job 123", - "project_type_id": cls.project_type.id, - "company_id": cls.company.id, - } - ) - - cls.task = cls.env["project.task"].create( - { - "name": "Task 450", - "project_id": cls.project.id, - "company_id": cls.company.id, - } - ) - - @classmethod - def _create_timesheet(cls, description="/", quantity=1, amount=50, date_=None): - cls.employee.timesheet_cost = amount - line = ( - cls.env["account.analytic.line"] - .sudo(cls.timesheet_user) - .create( - { - "company_id": cls.company.id, - "project_id": cls.project.id, - "task_id": cls.task.id, - "employee_id": cls.employee.id, - "name": description, - "date": date_ or datetime.now().date(), - "unit_amount": quantity, - } - ) - ) - return line.sudo() - - -class TestWIPJournalEntries(WIPJournalEntriesCase): - def test_if_shop_supply_account_filled__shop_supply_journal_must_be_filled(self): - with pytest.raises(ValidationError): - self.project_type.shop_supply_journal_id = False - - def test_if_shop_supply_account_filled__wip_account_must_be_filled(self): - with pytest.raises(ValidationError): - self.project_type.wip_account_id = False - - def test_on_create_timesheet__account_move_created(self): - timesheet_line = self._create_timesheet() - assert timesheet_line.shop_supply_account_move_id - - def test_on_create_timesheet__account_move_is_posted(self): - timesheet_line = self._create_timesheet() - assert timesheet_line.shop_supply_account_move_id.state == "posted" - - def test_after_timesheet_write__account_move_is_posted(self): - timesheet_line = self._create_timesheet() - timesheet_line.unit_amount = -100 - assert timesheet_line.shop_supply_account_move_id.state == "posted" - - def test_account_move_has_analytic_lines(self): - timesheet_line = self._create_timesheet() - shop_supply_move = timesheet_line.shop_supply_account_move_id - assert shop_supply_move.mapped("line_ids.analytic_line_ids") - - def test_analytic_line_is_shop_supply(self): - timesheet_line = self._create_timesheet() - shop_supply_move = timesheet_line.shop_supply_account_move_id - shop_supply_analytic_line = shop_supply_move.mapped( - "line_ids.analytic_line_ids" - ) - assert shop_supply_analytic_line.is_shop_supply - - def _get_wip_move_line(self, timesheet_line): - return timesheet_line.shop_supply_account_move_id.line_ids.filtered( - lambda l: l.account_id == self.wip_account - ) - - def _get_shop_supply_move_line(self, timesheet_line): - return timesheet_line.shop_supply_account_move_id.line_ids.filtered( - lambda l: l.account_id == self.shop_supply_account - ) - - def test_wip_move_line_analytic_account_is_project(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.analytic_account_id == self.project.analytic_account_id - - def test_wip_move_line_task_is_set(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.task_id == self.task - - def test_wip_move_line_with_positive_timesheet__has_debit(self): - quantity = 2 - expected_amount = 30 # 2 * 15 (quantity * shop supply rate) - timesheet_line = self._create_timesheet(quantity=quantity) - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.debit == expected_amount - - def test_wip_move_line_with_negative_timesheet__has_credit(self): - quantity = -2 - expected_amount = 30 # -2 * 15 (quantity * shop supply rate) - timesheet_line = self._create_timesheet(quantity=quantity) - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.credit == expected_amount - - def test_shop_supply_move_line_has_no_analytic_account(self): - timesheet_line = self._create_timesheet() - shop_supply_line = self._get_shop_supply_move_line(timesheet_line) - assert shop_supply_line - assert not shop_supply_line.analytic_account_id - - def test_shop_supply_move_line_has_no_task(self): - timesheet_line = self._create_timesheet() - shop_supply_line = self._get_shop_supply_move_line(timesheet_line) - assert shop_supply_line - assert not shop_supply_line.task_id - - def test_on_change_timesheet_quantity__move_quantity_updated(self): - timesheet_line = self._create_timesheet() - expected_quantity = 5 - timesheet_line.sudo(self.timesheet_user).unit_amount = expected_quantity - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.quantity == expected_quantity - - def test_on_change_timesheet_a_date__account_move_date_updated(self): - timesheet_line = self._create_timesheet() - new_date = datetime.now().date() + timedelta(30) - timesheet_line.sudo(self.timesheet_user).date = new_date - assert timesheet_line.shop_supply_account_move_id.date == new_date - - def test_if_project_has_no_type__no_account_move_created(self): - self.project.project_type_id = False - timesheet_line = self._create_timesheet() - assert not timesheet_line.shop_supply_account_move_id - - def test_if_project_type_has_no_shop_supply_account__no_account_move_created(self): - self.project_type.shop_supply_account_id = False - timesheet_line = self._create_timesheet() - assert not timesheet_line.shop_supply_account_move_id - - def test_if_timesheet_deleted__account_move_reversed(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - timesheet_line.unlink() - assert wip_line.reconciled - - def test_reversal_move_wip_line_has_task(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - timesheet_line.unlink() - assert wip_line.matched_credit_ids.credit_move_id.task_id == self.task - - def test_if_new_project_requires_no_timesheet__account_move_reversed(self): - timesheet_line = self._create_timesheet() - new_project = self.project.copy({"project_type_id": False}) - new_task = self.task.copy({"project_id": new_project.id}) - - wip_line = self._get_wip_move_line(timesheet_line) - timesheet_line.sudo(self.timesheet_user).write( - {"project_id": new_project.id, "task_id": new_task.id} - ) - assert wip_line.reconciled - - def test_timesheet_unit_amount_can_be_changed_twice(self): - timesheet_line = self._create_timesheet() - expected_quantity = 5 - timesheet_line.sudo(self.timesheet_user).unit_amount = 99 - timesheet_line.sudo(self.timesheet_user).unit_amount = expected_quantity - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.quantity == expected_quantity - - def test_move_ref_contains_task_id(self): - timesheet_line = self._create_timesheet() - assert str(self.task.id) in timesheet_line.shop_supply_account_move_id.ref - - def test_after_change_task_on_timesheet__move_ref_contains_task_id(self): - timesheet_line = self._create_timesheet() - new_task = self.task.copy() - timesheet_line.sudo(self.timesheet_user).task_id = new_task - assert str(new_task.id) in timesheet_line.shop_supply_account_move_id.ref - - def test_move_ref_contains_project_name(self): - timesheet_line = self._create_timesheet() - assert self.project.name in timesheet_line.shop_supply_account_move_id.ref - - def test_after_change_project_on_timesheet__move_ref_contains_project_name(self): - timesheet_line = self._create_timesheet() - new_project = self.project.copy() - new_task = self.task.copy({"project_id": new_project.id}) - timesheet_line.sudo(self.timesheet_user).write( - {"project_id": new_project.id, "task_id": new_task.id} - ) - assert new_project.name in timesheet_line.shop_supply_account_move_id.ref - - def test_if_zero_hour__no_entry_created(self): - timesheet_line = self._create_timesheet(quantity=0) - assert not timesheet_line.shop_supply_account_move_id - - -class TestTimesheetEntryTransferedToWip(WIPJournalEntriesCase): - """Test the cases where the WIP entries are already transfered to CGS.""" - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.timesheet_line = cls._create_timesheet() - cls.project.sudo().action_wip_to_cgs() - - def test_timesheet_quantity_can_not_be_changed(self): - with pytest.raises(ValidationError): - self.timesheet_line.sudo(self.timesheet_user).unit_amount = 10 - - def test_project_with_no_type_can_not_be_set(self): - new_project = self.project.copy({"project_type_id": False}) - new_task = self.task.copy({"project_id": new_project.id}) - with pytest.raises(ValidationError): - self.timesheet_line.sudo(self.timesheet_user).write( - {"project_id": new_project.id, "task_id": new_task.id} - ) - - def test_timesheet_can_not_be_deleted(self): - with pytest.raises(ValidationError): - self.timesheet_line.sudo(self.timesheet_user).unlink() diff --git a/.unported/project_wip_supply_cost/views/project_type.xml b/.unported/project_wip_supply_cost/views/project_type.xml deleted file mode 100644 index c226162b..00000000 --- a/.unported/project_wip_supply_cost/views/project_type.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Project Type Form: add Shop Supply (Indirect Costs) - project.type - - - - - - - - - - - - - diff --git a/.unported/project_wip_timesheet/README.rst b/.unported/project_wip_timesheet/README.rst deleted file mode 100644 index d7a50dca..00000000 --- a/.unported/project_wip_timesheet/README.rst +++ /dev/null @@ -1,81 +0,0 @@ -Project WIP Timesheet -===================== -This module extends the project_wip (Project Work in Progress) module. - -It allows to automatically generate WIP journal entries from timesheet entries. - -Configuration -------------- -As member of the group `Project / Manager`, I go to the form view of a project type. - -I notice 2 new fields: - -* Salary Account -* Salary Journal - -.. image:: static/description/project_type.png - -These 2 fields allow to define the salary account and journal to use in WIP journal entries generated from timesheets. - -If these fields are not filled, no journal entry will be generated by the timesheets for this project type. - -Employees -~~~~~~~~~ -As member of the group `Human Resources / Manager`, I set a timesheet cost for every employee. - -.. image:: static/description/employee_timesheet_cost.png - -This cost will be used in timesheets to transfer amounts from salaries to work in progress. - -Usage ------ -As member of the group `Project / User`, I go to the form view of a task. - -I add a timesheet line. - -.. image:: static/description/task_form.png - -As member of the group `Accounting / Billing`, I go to the general ledger and filter to see only entries for my project. - -I see one entry for my timesheet line. - -.. image:: static/description/general_ledger_filtered.png - -The amount of 31.25 USD represents 25 minutes (0.417 hours) x 75 USD (timesheet cost). - -I go to the list of analytic lines and I filter to see only entries for my project. - -.. image:: static/description/analytic_lines_filtered.png - -Updating A Timesheet Line -------------------------- -When modifying an existing timesheet line, the journal entry is updated (if required). - -For example, I modify the quantity on my timesheet line: - -.. image:: static/description/timesheet_line_updated.png - -The amount is updated on the journal entry: - -.. image:: static/description/journal_entry_updated_updated.png - -Deleting A Timesheet Line -------------------------- -When deleting a timesheet line, the journal entry is reversed. - -.. image:: static/description/timesheet_line_deleted.png - -.. image:: static/description/account_move_line_reversed.png - -WIP Entries Transfered To CGS ------------------------------ -If a `WIP / Salary` journal entry is already transfered to CGS (cost of goods sold), -the timesheet line can not be updated or deleted. - -If a user attempts to update such timesheet line, the following blocking message will appear: - -.. image:: static/description/timesheet_line_updated_error_message.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/project_wip_timesheet/__init__.py b/.unported/project_wip_timesheet/__init__.py deleted file mode 100644 index 6da4fa4e..00000000 --- a/.unported/project_wip_timesheet/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/project_wip_timesheet/__manifest__.py b/.unported/project_wip_timesheet/__manifest__.py deleted file mode 100644 index 96b16368..00000000 --- a/.unported/project_wip_timesheet/__manifest__.py +++ /dev/null @@ -1,23 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - 'name': 'Project WIP Timesheet', - 'version': '1.0.0', - 'author': 'Numigi', - 'maintainer': 'Numigi', - 'website': 'https://bit.ly/numigi-com', - 'license': 'LGPL-3', - 'category': 'Project', - 'summary': 'Generate WIP journal entries from timesheets', - 'depends': [ - 'project_wip', - 'project_task_analytic_lines', - 'hr_timesheet', - 'sale_timesheet', - ], - 'data': [ - 'views/project_type.xml', - ], - 'installable': True, -} diff --git a/.unported/project_wip_timesheet/i18n/fr.po b/.unported/project_wip_timesheet/i18n/fr.po deleted file mode 100644 index 7c2acc61..00000000 --- a/.unported/project_wip_timesheet/i18n/fr.po +++ /dev/null @@ -1,125 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * project_wip_timesheet -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-09 15:31+0000\n" -"PO-Revision-Date: 2020-12-09 10:33-0500\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 2.0.6\n" - -#. module: project_wip_timesheet -#: model:ir.model.fields,help:project_wip_timesheet.field_project_type__salary_account_id -msgid "" -"Account used for the salaries (usually the credit part) when transfering " -"salaries into work in progress." -msgstr "" -"Compte utilisé pour les salaires (habituellement la partie au crédit) lors " -"du transfert des salaires vers les travaux en cours." - -#. module: project_wip_timesheet -#: model:ir.model,name:project_wip_timesheet.model_account_analytic_line -msgid "Analytic Line" -msgstr "" - -#. module: project_wip_timesheet -#: model_terms:ir.ui.view,arch_db:project_wip_timesheet.project_type_form_with_salary_account -msgid "Direct Labour" -msgstr "Main d'oeuvre directe" - -#. module: project_wip_timesheet -#: code:addons/project_wip_timesheet/models/project_type.py:43 -#, python-format -msgid "" -"If the salary account is filled for a project type, the salary journal must " -"be filled as well." -msgstr "" -"Si le compte de salaire est sélectionné sur le type de projet, le journal de " -"salaires doit aussi être sélectionné." - -#. module: project_wip_timesheet -#: code:addons/project_wip_timesheet/models/project_type.py:35 -#, python-format -msgid "" -"If the salary account is filled for a project type, the work in progress " -"account must be filled as well." -msgstr "" -"Si le compte de salaire est sélectionné sur le type de projet, le compte de " -"travaux en cours doit aussi être sélectionné." - -#. module: project_wip_timesheet -#: model:ir.model.fields,help:project_wip_timesheet.field_project_type__salary_journal_id -msgid "" -"Journal used for transfering salaries into work in progress when creating or " -"updating a timesheet entry." -msgstr "" -"Journal utilisé dans du transfert des salaires vers les travaux en cours " -"lors qu'une ligne de feuille de temps est créée ou mise à jour." - -#. module: project_wip_timesheet -#: model:ir.model,name:project_wip_timesheet.model_project_type -msgid "Project Type" -msgstr "" - -#. module: project_wip_timesheet -#: model:ir.model.fields,field_description:project_wip_timesheet.field_project_type__salary_account_id -msgid "Salary Account" -msgstr "Compte de salaires" - -#. module: project_wip_timesheet -#: model:ir.model.fields,field_description:project_wip_timesheet.field_project_type__salary_journal_id -msgid "Salary Journal" -msgstr "Journal de salaires" - -#. module: project_wip_timesheet -#: model:ir.model.fields,field_description:project_wip_timesheet.field_account_analytic_line__salary_account_move_id -msgid "Salary Journal Entry" -msgstr "Pièce comptable de salaire" - -#. module: project_wip_timesheet -#: code:addons/project_wip_timesheet/models/account_analytic_line.py:123 -#, python-format -msgid "" -"The timesheet line {description} can not be deleted because the work in " -"progress entry ({move_name}) is already transfered into the cost of goods " -"sold." -msgstr "" -"La ligne de temps {description} ne peut pas être supprimée car l'écriture " -"comptable de travaux en cours ({move_name}) est déjà transférée vers le coût " -"des marchandises vendues." - -#. module: project_wip_timesheet -#: code:addons/project_wip_timesheet/models/account_analytic_line.py:87 -#, python-format -msgid "" -"The timesheet line {description} can not be updated because the work in " -"progress entry ({move_name}) is already transfered into the cost of goods " -"sold." -msgstr "" -"La ligne de temps {description} ne peut pas être mise à jour car l'écriture " -"comptable de travaux en cours ({move_name}) est déjà transférée vers le coût " -"des marchandises vendues." - -#. module: project_wip_timesheet -#: code:addons/project_wip_timesheet/models/account_analytic_line.py:106 -#, python-format -msgid "" -"The timesheet line {description} can not be updated because the work in " -"progress entry ({move_name}) would be reversed. This journal entry was " -"already transfered into the cost of goods sold." -msgstr "" -"La ligne de temps {description} ne peut pas être mise à jour car l'écriture " -"comptable de travaux en cours ({move_name}) serait renversée. L'écriture " -"comptable est déjà transférée vers le coût des marchandises vendues." - -#~ msgid "(task: {})" -#~ msgstr "(tâche: {})" diff --git a/.unported/project_wip_timesheet/models/__init__.py b/.unported/project_wip_timesheet/models/__init__.py deleted file mode 100644 index b38a5350..00000000 --- a/.unported/project_wip_timesheet/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import account_analytic_line, project_type diff --git a/.unported/project_wip_timesheet/models/account_analytic_line.py b/.unported/project_wip_timesheet/models/account_analytic_line.py deleted file mode 100644 index db098b80..00000000 --- a/.unported/project_wip_timesheet/models/account_analytic_line.py +++ /dev/null @@ -1,218 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models, _ -from odoo.exceptions import ValidationError - - -class TimesheetLine(models.Model): - - _inherit = "account.analytic.line" - - salary_account_move_id = fields.Many2one( - "account.move", "Salary Journal Entry", ondelete="restrict" - ) - - @api.model - def create(self, vals): - """On timesheet create, create or update the wip journal entry. - - Because the creation of a timesheet is complex, the journal entry - may be created by a write before the return of super().create(vals). - """ - line = super().create(vals) - if line._requires_salary_move(): - line.sudo()._create_update_or_reverse_salary_account_move() - return line - - @api.multi - def write(self, vals): - """When updating an analytic line, create / update / delete the wip entry. - - Whether the wip entry must be created / updated / deleted depends - on which field is written to. This prevents an infinite loop. - """ - super().write(vals) - - fields_to_check = self._get_salary_move_dependent_fields() - if fields_to_check.intersection(vals): - for line in self: - line.sudo()._create_update_or_reverse_salary_account_move() - - return True - - @api.multi - def unlink(self): - """Reverse the salary account move entry when a timesheet line is deleted.""" - lines_with_moves = self.filtered(lambda l: l.salary_account_move_id) - for line in lines_with_moves: - line.sudo()._reverse_salary_account_move_for_deleted_timesheet() - return super().unlink() - - def _create_update_or_reverse_salary_account_move(self): - """Create / Update / Reverse the wip account move. - - Depending on the status of the timesheet line, - the wip move is either created, updated or reversed. - """ - must_create_salary_move = ( - self._requires_salary_move() and not self.salary_account_move_id - ) - must_update_salary_move = ( - self._requires_salary_move() and self.salary_account_move_id - ) - must_reverse_salary_move = ( - not self._requires_salary_move() and self.salary_account_move_id - ) - - if must_create_salary_move: - self._create_salary_account_move() - - elif must_update_salary_move: - self._update_salary_account_move() - - elif must_reverse_salary_move: - self._reverse_salary_account_move_for_updated_timesheet() - - def _create_salary_account_move(self): - """Create the wip journal entry.""" - vals = self._get_salary_account_move_vals() - self.salary_account_move_id = self.env["account.move"].create(vals) - self.salary_account_move_id.post() - - def _update_salary_account_move(self): - """Update the wip journal entry.""" - if self._is_salary_account_move_reconciled(): - raise ValidationError( - _( - "The timesheet line {description} can not " - "be updated because the work in progress entry ({move_name}) is already " - "transfered into the cost of goods sold." - ).format( - description=self._get_wip_timesheet_line_description(), - move_name=self.salary_account_move_id.name, - ) - ) - - self.salary_account_move_id.state = "draft" - vals = self._get_salary_account_move_vals() - self.salary_account_move_id.write(vals) - self.salary_account_move_id.post() - - def _reverse_salary_account_move_for_updated_timesheet(self): - """Reverse the wip journal entry in the context of an updated timesheet.""" - if self._is_salary_account_move_reconciled(): - raise ValidationError( - _( - "The timesheet line {description} can not " - "be updated because the work in progress entry ({move_name}) would be " - "reversed. This journal entry was already transfered into " - "the cost of goods sold." - ).format( - description=self._get_wip_timesheet_line_description(), - move_name=self.salary_account_move_id.name, - ) - ) - self.salary_account_move_id.reverse_moves() - self.salary_account_move_id = False - - def _reverse_salary_account_move_for_deleted_timesheet(self): - """Reverse the wip journal entry in the context of a deleted timesheet.""" - if self._is_salary_account_move_reconciled(): - raise ValidationError( - _( - "The timesheet line {description} can not " - "be deleted because the work in progress entry ({move_name}) is already " - "transfered into the cost of goods sold." - ).format( - description=self._get_wip_timesheet_line_description(), - move_name=self.salary_account_move_id.name, - ) - ) - self.salary_account_move_id.reverse_moves() - - def _is_salary_account_move_reconciled(self): - return any(l.reconciled for l in self.salary_account_move_id.line_ids) - - def _get_salary_account_move_vals(self): - """Get the values for the wip account move. - - :rtype: dict - """ - reference = "{project} / TA#{task}".format( - project=self.project_id.display_name, task=self.task_id.id - ) - return { - "company_id": self.company_id.id, - "journal_id": self._get_salary_journal().id, - "date": self.date, - "no_analytic_lines": True, - "ref": reference, - "line_ids": [ - (5, 0), - (0, 0, self._get_salary_wip_move_line_vals()), - (0, 0, self._get_salary_move_line_vals()), - ], - } - - def _get_salary_wip_move_line_vals(self): - """Get the values for the wip account move line (usually the debit). - - :rtype: dict - """ - return { - "account_id": self._get_wip_account().id, - "name": self.name, - "debit": -self.amount if self.amount < 0 else 0, - "credit": self.amount if self.amount > 0 else 0, - "quantity": self.unit_amount, - "analytic_account_id": self.project_id.analytic_account_id.id, - "task_id": self.task_id.id, - } - - def _get_salary_move_line_vals(self): - """Get the values for the salary account move line (usually the credit). - - :rtype: dict - """ - return { - "account_id": self._get_salary_account().id, - "name": self.name, - "debit": self.amount if self.amount > 0 else 0, - "credit": -self.amount if self.amount < 0 else 0, - "quantity": self.unit_amount, - } - - def _get_salary_move_dependent_fields(self): - """Get the fields that trigger an update of the wip entry. - - :rtype: Set - """ - return {"name", "amount", "unit_amount", "date", "project_id", "task_id"} - - def _requires_salary_move(self): - """Evaluate whether the timesheet line requires a wip journal entry. - - If the account.analytic.line has a value in the field project_id, - it is a timesheet line. - - If the project type has a salary account, then the line requires - a salary account move. - - :rtype: bool - """ - return self.amount and bool(self._get_salary_account()) - - def _get_salary_journal(self): - """Get the journal to use for wip entry. - - :rtype: account.journal - """ - return self.project_id.project_type_id.salary_journal_id - - def _get_salary_account(self): - """Get the account to use for the salary move line. - - :rtype: account.account - """ - return self.project_id.project_type_id.salary_account_id diff --git a/.unported/project_wip_timesheet/models/project_type.py b/.unported/project_wip_timesheet/models/project_type.py deleted file mode 100644 index a1f4a6f5..00000000 --- a/.unported/project_wip_timesheet/models/project_type.py +++ /dev/null @@ -1,47 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, fields, models, _ -from odoo.exceptions import ValidationError - - -class ProjectType(models.Model): - """Add the salary account to project types.""" - - _inherit = "project.type" - - salary_journal_id = fields.Many2one( - "account.journal", - "Salary Journal", - company_dependent=True, - help="Journal used for transfering salaries into work in progress " - "when creating or updating a timesheet entry.", - ) - - salary_account_id = fields.Many2one( - "account.account", - "Salary Account", - company_dependent=True, - help="Account used for the salaries (usually the credit part) " - "when transfering salaries into work in progress.", - ) - - @api.constrains("salary_account_id", "salary_journal_id", "wip_account_id") - def _check_required_fields_for_salary_entries(self): - project_types_with_salary_account = self.filtered(lambda t: t.salary_account_id) - for project_type in project_types_with_salary_account: - if not project_type.wip_account_id: - raise ValidationError( - _( - "If the salary account is filled for a project type, " - "the work in progress account must be filled as well." - ) - ) - - if not project_type.salary_journal_id: - raise ValidationError( - _( - "If the salary account is filled for a project type, " - "the salary journal must be filled as well." - ) - ) diff --git a/.unported/project_wip_timesheet/static/description/account_move_line_reversed.png b/.unported/project_wip_timesheet/static/description/account_move_line_reversed.png deleted file mode 100644 index 41d13dd8..00000000 Binary files a/.unported/project_wip_timesheet/static/description/account_move_line_reversed.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/analytic_lines_filtered.png b/.unported/project_wip_timesheet/static/description/analytic_lines_filtered.png deleted file mode 100644 index 4d0c7d21..00000000 Binary files a/.unported/project_wip_timesheet/static/description/analytic_lines_filtered.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/employee_timesheet_cost.png b/.unported/project_wip_timesheet/static/description/employee_timesheet_cost.png deleted file mode 100644 index 8be6edd3..00000000 Binary files a/.unported/project_wip_timesheet/static/description/employee_timesheet_cost.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/general_ledger_filtered.png b/.unported/project_wip_timesheet/static/description/general_ledger_filtered.png deleted file mode 100644 index 76334d97..00000000 Binary files a/.unported/project_wip_timesheet/static/description/general_ledger_filtered.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/icon.png b/.unported/project_wip_timesheet/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/project_wip_timesheet/static/description/icon.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/journal_entry_updated_updated.png b/.unported/project_wip_timesheet/static/description/journal_entry_updated_updated.png deleted file mode 100644 index ce48ebb5..00000000 Binary files a/.unported/project_wip_timesheet/static/description/journal_entry_updated_updated.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/project_type.png b/.unported/project_wip_timesheet/static/description/project_type.png deleted file mode 100644 index 04e6efba..00000000 Binary files a/.unported/project_wip_timesheet/static/description/project_type.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/task_form.png b/.unported/project_wip_timesheet/static/description/task_form.png deleted file mode 100644 index 722dad68..00000000 Binary files a/.unported/project_wip_timesheet/static/description/task_form.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/timesheet_line_deleted.png b/.unported/project_wip_timesheet/static/description/timesheet_line_deleted.png deleted file mode 100644 index d92a2336..00000000 Binary files a/.unported/project_wip_timesheet/static/description/timesheet_line_deleted.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/timesheet_line_updated.png b/.unported/project_wip_timesheet/static/description/timesheet_line_updated.png deleted file mode 100644 index 2858a474..00000000 Binary files a/.unported/project_wip_timesheet/static/description/timesheet_line_updated.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/static/description/timesheet_line_updated_error_message.png b/.unported/project_wip_timesheet/static/description/timesheet_line_updated_error_message.png deleted file mode 100644 index 52b08c72..00000000 Binary files a/.unported/project_wip_timesheet/static/description/timesheet_line_updated_error_message.png and /dev/null differ diff --git a/.unported/project_wip_timesheet/tests/__init__.py b/.unported/project_wip_timesheet/tests/__init__.py deleted file mode 100644 index 6ef2df91..00000000 --- a/.unported/project_wip_timesheet/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/project_wip_timesheet/tests/test_wip_journal_entries.py b/.unported/project_wip_timesheet/tests/test_wip_journal_entries.py deleted file mode 100644 index e5a77a5e..00000000 --- a/.unported/project_wip_timesheet/tests/test_wip_journal_entries.py +++ /dev/null @@ -1,339 +0,0 @@ -# © 2019 Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import pytest -from datetime import datetime, timedelta -from odoo import fields -from odoo.tests import common -from odoo.exceptions import ValidationError - - -class WIPJournalEntriesCase(common.SavepointCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.company = cls.env["res.company"].create({"name": "Test Company"}) - cls.manager = cls.env["res.users"].create( - { - "name": "Manager", - "login": "manager", - "email": "manager@test.com", - "groups_id": [(4, cls.env.ref("project.group_project_manager").id)], - "company_id": cls.company.id, - "company_ids": [(4, cls.company.id)], - } - ) - - cls.timesheet_user = cls.env["res.users"].create( - { - "name": "Timesheet User", - "login": "timesheet_user@example.com", - "email": "timesheet_user@example.com", - "groups_id": [ - (4, cls.env.ref("hr_timesheet.group_hr_timesheet_user").id) - ], - "company_id": cls.company.id, - "company_ids": [(4, cls.company.id)], - } - ) - - cls.employee = cls.env["hr.employee"].create( - { - "name": "Timesheet User", - "user_id": cls.timesheet_user.id, - "company_id": cls.company.id, - } - ) - - cls.salary_journal = cls.env["account.journal"].create( - { - "name": "Salary To WIP", - "code": "SALARY", - "type": "general", - "company_id": cls.company.id, - } - ) - - cls.cgs_journal = cls.env["account.journal"].create( - { - "name": "Work in Progress", - "code": "WIP", - "update_posted": True, - "type": "general", - "company_id": cls.company.id, - } - ) - - cls.wip_account = cls.env["account.account"].create( - { - "name": "Work In Progress", - "code": "140101", - "user_type_id": cls.env.ref( - "account.data_account_type_non_current_assets" - ).id, - "reconcile": True, - "company_id": cls.company.id, - } - ) - - cls.cgs_account = cls.env["account.account"].create( - { - "name": "Cost of Goods Sold", - "code": "510101", - "user_type_id": cls.env.ref("account.data_account_type_expenses").id, - "company_id": cls.company.id, - } - ) - - cls.salary_account = cls.env["account.account"].create( - { - "name": "Salary", - "code": "510201", - "user_type_id": cls.env.ref("account.data_account_type_expenses").id, - "company_id": cls.company.id, - } - ) - - cls.env = cls.env(user=cls.manager, context={"force_company": cls.company.id}) - - cls.env["project.project"].create( - {"name": "Job 123", "company_id": cls.company.id} - ) - - cls.project_type = cls.env["project.type"].create( - { - "name": "Trailer Refurb", - "wip_account_id": cls.wip_account.id, - "salary_journal_id": cls.salary_journal.id, - "salary_account_id": cls.salary_account.id, - "cgs_account_id": cls.cgs_account.id, - "cgs_journal_id": cls.cgs_journal.id, - } - ) - - cls.project = cls.env["project.project"].create( - { - "name": "Job 123", - "project_type_id": cls.project_type.id, - "company_id": cls.company.id, - } - ) - - cls.task = cls.env["project.task"].create( - { - "name": "Task 450", - "project_id": cls.project.id, - "company_id": cls.company.id, - } - ) - - @classmethod - def _create_timesheet(cls, description="/", quantity=1, amount=50, date_=None): - cls.employee.timesheet_cost = amount - line = ( - cls.env["account.analytic.line"] - .sudo(cls.timesheet_user) - .create( - { - "company_id": cls.company.id, - "project_id": cls.project.id, - "task_id": cls.task.id, - "employee_id": cls.employee.id, - "name": description, - "date": date_ or datetime.now().date(), - "unit_amount": quantity, - } - ) - ) - return line.sudo() - - -class TestWIPJournalEntries(WIPJournalEntriesCase): - def test_if_salary_account_filled__salary_journal_must_be_filled(self): - with pytest.raises(ValidationError): - self.project_type.salary_journal_id = False - - def test_if_salary_account_filled__wip_account_must_be_filled(self): - with pytest.raises(ValidationError): - self.project_type.wip_account_id = False - - def test_on_create_timesheet__account_move_created(self): - timesheet_line = self._create_timesheet() - assert timesheet_line.salary_account_move_id - - def test_on_create_timesheet__account_move_is_posted(self): - timesheet_line = self._create_timesheet() - assert timesheet_line.salary_account_move_id.state == "posted" - - def test_after_timesheet_write__account_move_is_posted(self): - timesheet_line = self._create_timesheet() - timesheet_line.amount = -100 - assert timesheet_line.salary_account_move_id.state == "posted" - - def test_account_move_has_no_analytic_lines(self): - timesheet_line = self._create_timesheet() - assert not timesheet_line.salary_account_move_id.mapped( - "line_ids.analytic_line_ids" - ) - - def _get_wip_move_line(self, timesheet_line): - return timesheet_line.salary_account_move_id.line_ids.filtered( - lambda l: l.account_id == self.wip_account - ) - - def _get_salary_move_line(self, timesheet_line): - return timesheet_line.salary_account_move_id.line_ids.filtered( - lambda l: l.account_id == self.salary_account - ) - - def test_wip_move_line_analytic_account_is_project(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.analytic_account_id == self.project.analytic_account_id - - def test_wip_move_line_task_is_set(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.task_id == self.task - - def test_wip_move_line_with_positive_timesheet__has_debit(self): - expected_amount = 100 - timesheet_line = self._create_timesheet(amount=expected_amount) - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.debit == expected_amount - - def test_wip_move_line_with_negative_timesheet__has_credit(self): - expected_amount = 100 - timesheet_line = self._create_timesheet(quantity=-1, amount=expected_amount) - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.credit == expected_amount - - def test_salary_move_line_has_no_analytic_account(self): - timesheet_line = self._create_timesheet() - salary_line = self._get_salary_move_line(timesheet_line) - assert salary_line - assert not salary_line.analytic_account_id - - def test_salary_move_line_has_no_task(self): - timesheet_line = self._create_timesheet() - salary_line = self._get_salary_move_line(timesheet_line) - assert salary_line - assert not salary_line.task_id - - def test_on_change_timesheet_amount__debit_amount_updated(self): - timesheet_line = self._create_timesheet() - expected_amount = 25 - timesheet_line.sudo(self.timesheet_user).amount = -expected_amount - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.debit == expected_amount - - def test_on_change_timesheet_quantity__move_quantity_updated(self): - timesheet_line = self._create_timesheet() - expected_quantity = 5 - timesheet_line.sudo(self.timesheet_user).unit_amount = expected_quantity - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.quantity == expected_quantity - - def test_on_change_timesheet_a_date__account_move_date_updated(self): - timesheet_line = self._create_timesheet() - new_date = datetime.now().date() + timedelta(30) - timesheet_line.sudo(self.timesheet_user).date = new_date - assert timesheet_line.salary_account_move_id.date == new_date - - def test_if_project_has_no_type__no_account_move_created(self): - self.project.project_type_id = False - timesheet_line = self._create_timesheet() - assert not timesheet_line.salary_account_move_id - - def test_if_project_type_has_no_salary_account__no_account_move_created(self): - self.project_type.salary_account_id = False - timesheet_line = self._create_timesheet() - assert not timesheet_line.salary_account_move_id - - def test_if_timesheet_deleted__account_move_reversed(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - timesheet_line.unlink() - assert wip_line.reconciled - - def test_reversal_move_wip_line_has_task(self): - timesheet_line = self._create_timesheet() - wip_line = self._get_wip_move_line(timesheet_line) - timesheet_line.unlink() - assert wip_line.matched_credit_ids.credit_move_id.task_id == self.task - - def test_if_new_project_requires_no_timesheet__account_move_reversed(self): - timesheet_line = self._create_timesheet() - new_project = self.project.copy({"project_type_id": False}) - new_task = self.task.copy({"project_id": new_project.id}) - - wip_line = self._get_wip_move_line(timesheet_line) - timesheet_line.sudo(self.timesheet_user).write( - {"project_id": new_project.id, "task_id": new_task.id} - ) - assert wip_line.reconciled - - def test_timesheet_amount_can_be_changed_twice(self): - timesheet_line = self._create_timesheet() - expected_amount = 25 - timesheet_line.sudo(self.timesheet_user).amount = -20 - timesheet_line.sudo(self.timesheet_user).amount = -expected_amount - wip_line = self._get_wip_move_line(timesheet_line) - assert wip_line.debit == expected_amount - - def test_move_ref_contains_task_id(self): - timesheet_line = self._create_timesheet() - assert str(self.task.id) in timesheet_line.salary_account_move_id.ref - - def test_after_change_task_on_timesheet__move_ref_contains_task_id(self): - timesheet_line = self._create_timesheet() - new_task = self.task.copy() - timesheet_line.sudo(self.timesheet_user).task_id = new_task - assert str(new_task.id) in timesheet_line.salary_account_move_id.ref - - def test_move_ref_contains_project_name(self): - timesheet_line = self._create_timesheet() - assert self.project.name in timesheet_line.salary_account_move_id.ref - - def test_after_change_project_on_timesheet__move_ref_contains_project_name(self): - timesheet_line = self._create_timesheet() - new_project = self.project.copy() - new_task = self.task.copy({"project_id": new_project.id}) - timesheet_line.sudo(self.timesheet_user).write( - {"project_id": new_project.id, "task_id": new_task.id} - ) - assert new_project.name in timesheet_line.salary_account_move_id.ref - - def test_if_zero_hour__no_entry_created(self): - timesheet_line = self._create_timesheet(quantity=0) - assert not timesheet_line.salary_account_move_id - - -class TestTimesheetEntryTransferedToWip(WIPJournalEntriesCase): - """Test the cases where the WIP entries are already transfered to CGS.""" - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.timesheet_line = cls._create_timesheet() - cls.project.sudo().action_wip_to_cgs() - - def test_timesheet_amount_can_not_be_changed(self): - with pytest.raises(ValidationError): - self.timesheet_line.sudo(self.timesheet_user).amount = -100 - - def test_timesheet_quantity_can_not_be_changed(self): - with pytest.raises(ValidationError): - self.timesheet_line.sudo(self.timesheet_user).unit_amount = 10 - - def test_project_with_no_type_can_not_be_set(self): - new_project = self.project.copy({"project_type_id": False}) - new_task = self.task.copy({"project_id": new_project.id}) - with pytest.raises(ValidationError): - self.timesheet_line.sudo(self.timesheet_user).write( - {"project_id": new_project.id, "task_id": new_task.id} - ) - - def test_timesheet_can_not_be_deleted(self): - with pytest.raises(ValidationError): - self.timesheet_line.sudo(self.timesheet_user).unlink() diff --git a/.unported/project_wip_timesheet/views/project_type.xml b/.unported/project_wip_timesheet/views/project_type.xml deleted file mode 100644 index 6c67aa42..00000000 --- a/.unported/project_wip_timesheet/views/project_type.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Project Type Form: add salary account - project.type - - - - - - - - - - - - diff --git a/.unported/timesheet_task_project_no_change/README.rst b/.unported/timesheet_task_project_no_change/README.rst deleted file mode 100644 index c1032c49..00000000 --- a/.unported/timesheet_task_project_no_change/README.rst +++ /dev/null @@ -1,12 +0,0 @@ -Timesheet Task Project No Change -================================ -This module prevents changing the project on a task with timesheet lines. - -When changing the project on a task, if this task or any subtask has timesheet lines, -a blocking message will appear. - -.. image:: static/description/error_message.png - -Contributors ------------- -* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/.unported/timesheet_task_project_no_change/__init__.py b/.unported/timesheet_task_project_no_change/__init__.py deleted file mode 100644 index 22b7d417..00000000 --- a/.unported/timesheet_task_project_no_change/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/.unported/timesheet_task_project_no_change/__manifest__.py b/.unported/timesheet_task_project_no_change/__manifest__.py deleted file mode 100644 index 9d59f399..00000000 --- a/.unported/timesheet_task_project_no_change/__manifest__.py +++ /dev/null @@ -1,15 +0,0 @@ -# © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -{ - "name": "Timesheet Task Project No Change", - "version": "1.0.0", - "author": "Numigi", - "maintainer": "Numigi", - "website": "https://bit.ly/numigi-com", - "license": "LGPL-3", - "category": "Project", - "summary": "Prevent changing the project on a task with timesheets.", - "depends": ["hr_timesheet"], - "installable": True, -} diff --git a/.unported/timesheet_task_project_no_change/i18n/fr.po b/.unported/timesheet_task_project_no_change/i18n/fr.po deleted file mode 100644 index 307145f2..00000000 --- a/.unported/timesheet_task_project_no_change/i18n/fr.po +++ /dev/null @@ -1,33 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * timesheet_task_project_no_change -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-16 21:31+0000\n" -"PO-Revision-Date: 2020-04-16 21:31+0000\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: timesheet_task_project_no_change -#: model:ir.model,name:timesheet_task_project_no_change.model_project_task -msgid "Task" -msgstr "" - -#. module: timesheet_task_project_no_change -#: code:addons/timesheet_task_project_no_change/models/project_task.py:43 -#, python-format -msgid "Timesheets have already been entered on a sub-task ({subtask}). In order to modify the project of the parent task ({task}), there must be no time on the parent task, nor on its child tasks." -msgstr "Du temps a été saisi une des tâches enfant ({subtask}). Pour modifier le projet de la tâche parente ({task}), il ne doit pas y avoir de temps saisi sur celle-ci ou sur ses tâches enfants." - -#. module: timesheet_task_project_no_change -#: code:addons/timesheet_task_project_no_change/models/project_task.py:29 -#, python-format -msgid "Timesheets have already been entered on this task ({task}). In order to modify the project of this task, you may close the task and create another in the target project." -msgstr "Du temps a déjà été saisi sur la tâche ({task}). Pour modifier le projet de la tâche, veuillez fermer celle-ci et en créer une nouvelle sur le projet cible." diff --git a/.unported/timesheet_task_project_no_change/models/__init__.py b/.unported/timesheet_task_project_no_change/models/__init__.py deleted file mode 100644 index 93d002b8..00000000 --- a/.unported/timesheet_task_project_no_change/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from . import project_task diff --git a/.unported/timesheet_task_project_no_change/models/project_task.py b/.unported/timesheet_task_project_no_change/models/project_task.py deleted file mode 100644 index 44e122da..00000000 --- a/.unported/timesheet_task_project_no_change/models/project_task.py +++ /dev/null @@ -1,51 +0,0 @@ -# © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, api, _ -from odoo.exceptions import ValidationError - - -class Task(models.Model): - _inherit = "project.task" - - def write(self, vals): - if "project_id" in vals: - project = self.env["project.project"].browse(vals["project_id"]) - tasks_with_different_project = self.filtered( - lambda t: t.project_id != project - ) - - for task in tasks_with_different_project: - task._check_has_no_timesheet() - task._check_has_no_subtask_timesheet() - - return super().write(vals) - - def _check_has_no_timesheet(self): - if self.sudo().timesheet_ids: - raise ValidationError( - _( - "Timesheets have already been entered on this task ({task}). " - "In order to modify the project of this task, you may " - "close the task and create another in the target project." - ).format(task=self.display_name) - ) - - def _check_has_no_subtask_timesheet(self): - timesheets = ( - self.env["account.analytic.line"] - .sudo() - .search([("task_id.parent_id", "=", self.id)]) - ) - - if timesheets: - raise ValidationError( - _( - "Timesheets have already been entered on a sub-task ({subtask}). " - "In order to modify the project of the parent task ({task}), there must " - "be no time on the parent task, nor on its child tasks." - ).format( - task=self.display_name, - subtask=timesheets[0].task_id.display_name - ) - ) diff --git a/.unported/timesheet_task_project_no_change/static/description/error_message.png b/.unported/timesheet_task_project_no_change/static/description/error_message.png deleted file mode 100644 index 92335a8b..00000000 Binary files a/.unported/timesheet_task_project_no_change/static/description/error_message.png and /dev/null differ diff --git a/.unported/timesheet_task_project_no_change/static/description/icon.png b/.unported/timesheet_task_project_no_change/static/description/icon.png deleted file mode 100644 index 92a86b10..00000000 Binary files a/.unported/timesheet_task_project_no_change/static/description/icon.png and /dev/null differ diff --git a/.unported/timesheet_task_project_no_change/tests/__init__.py b/.unported/timesheet_task_project_no_change/tests/__init__.py deleted file mode 100644 index 7fa1774d..00000000 --- a/.unported/timesheet_task_project_no_change/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). diff --git a/.unported/timesheet_task_project_no_change/tests/test_project_task.py b/.unported/timesheet_task_project_no_change/tests/test_project_task.py deleted file mode 100644 index a5c87a99..00000000 --- a/.unported/timesheet_task_project_no_change/tests/test_project_task.py +++ /dev/null @@ -1,46 +0,0 @@ -# © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import pytest -from odoo.exceptions import ValidationError -from odoo.tests import common - - -class TestProjectTaskSubTaskSameProject(common.SavepointCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.project_a = cls.env["project.project"].create({"name": "projectA"}) - cls.project_b = cls.env["project.project"].create({"name": "projectB"}) - cls.task = cls.env["project.task"].create( - {"name": "Parent Task", "project_id": cls.project_a.id} - ) - cls.subtask = cls.env["project.task"].create( - { - "name": "Child Task", - "project_id": cls.project_a.id, - "parent_id": cls.task.id, - } - ) - - def test_if_no_timesheet__project_can_be_changed(self): - self.task.project_id = self.project_b - - def test_if_project_is_the_same__constraint_not_raised(self): - self._make_timesheet_line(self.task) - self.task.project_id = self.project_a - - def test_if_task_has_timesheet__project_can_not_be_changed(self): - self._make_timesheet_line(self.task) - with pytest.raises(ValidationError): - self.task.project_id = self.project_b - - def test_if_subtask_has_timesheet__project_can_not_be_changed(self): - self._make_timesheet_line(self.subtask) - with pytest.raises(ValidationError): - self.task.project_id = self.project_b - - def _make_timesheet_line(self, task): - return self.env["account.analytic.line"].create( - {"task_id": task.id, "project_id": task.project_id.id, "name": "/"} - ) diff --git a/Dockerfile b/Dockerfile index a5d81811..c792a159 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM quay.io/numigi/odoo-public:14.latest -MAINTAINER numigi +LABEL maintainer="contact@numigi.com" USER root @@ -22,53 +22,33 @@ COPY project_closed /mnt/extra-addons/project_closed COPY project_cost_smart_button /mnt/extra-addons/project_cost_smart_button COPY project_default_task_stage /mnt/extra-addons/project_default_task_stage COPY project_enhanced /mnt/extra-addons/project_enhanced -#COPY project_estimation /mnt/extra-addons/project_estimation -#COPY project_estimation_material /mnt/extra-addons/project_estimation_material COPY project_form_with_dates /mnt/extra-addons/project_form_with_dates COPY project_group_create /mnt/extra-addons/project_group_create COPY project_hide_create_sale_order /mnt/extra-addons/project_hide_create_sale_order COPY project_iteration /mnt/extra-addons/project_iteration COPY project_iteration_parent_only /mnt/extra-addons/project_iteration_parent_only COPY project_iteration_parent_type_required /mnt/extra-addons/project_iteration_parent_type_required -#COPY project_iteration_sale_inheritance /mnt/extra-addons/project_iteration_sale_inheritance -#COPY project_kanban_dates /mnt/extra-addons/project_kanban_dates -#COPY project_kanban_to_form /mnt/extra-addons/project_kanban_to_form COPY project_lump_sum /mnt/extra-addons/project_lump_sum COPY project_material /mnt/extra-addons/project_material COPY project_material_direct /mnt/extra-addons/project_material_direct -#COPY project_material_progress /mnt/extra-addons/project_material_progress -#COPY project_material_quantity_filters /mnt/extra-addons/project_material_quantity_filters -#COPY project_milestone_dependency /mnt/extra-addons/project_milestone_dependency COPY project_milestone_enhanced /mnt/extra-addons/project_milestone_enhanced COPY project_milestone_estimated_hours /mnt/extra-addons/project_milestone_estimated_hours -#COPY project_milestone_remaining_hours /mnt/extra-addons/project_milestone_remaining_hours COPY project_milestone_spent_hours /mnt/extra-addons/project_milestone_spent_hours -#COPY project_milestone_start_date /mnt/extra-addons/project_milestone_start_date COPY project_milestone_time_report /mnt/extra-addons/project_milestone_time_report -#COPY project_milestone_type /mnt/extra-addons/project_milestone_type COPY project_milestone_time_kpi /mnt/extra-addons/project_milestone_time_kpi -#COPY project_milestone_timeline /mnt/extra-addons/project_milestone_timeline -#COPY project_milestone_timeline_color /mnt/extra-addons/project_milestone_timeline_color -#COPY project_milestone_week_duration /mnt/extra-addons/project_milestone_week_duration COPY project_no_quick_create /mnt/extra-addons/project_no_quick_create COPY project_outsourcing /mnt/extra-addons/project_outsourcing COPY project_outsourcing_timesheet_automation /mnt/extra-addons/project_outsourcing_timesheet_automation -#COPY project_portal_hide_timesheets /mnt/extra-addons/project_portal_hide_timesheets -#COPY project_portal_no_subtask /mnt/extra-addons/project_portal_no_subtask COPY project_portal_parent_task /mnt/extra-addons/project_portal_parent_task COPY project_remaining_hours_update /mnt/extra-addons/project_remaining_hours_update -#COPY project_role_milestone /mnt/extra-addons/project_role_milestone COPY project_stage /mnt/extra-addons/project_stage COPY project_stage_allow_timesheet /mnt/extra-addons/project_stage_allow_timesheet COPY project_stage_no_quick_create /mnt/extra-addons/project_stage_no_quick_create COPY project_task_analytic_lines /mnt/extra-addons/project_task_analytic_lines -#COPY project_task_analytic_lines_stock /mnt/extra-addons/project_task_analytic_lines_stock -#COPY project_task_customer_reference /mnt/extra-addons/project_task_customer_reference COPY project_task_date_planned /mnt/extra-addons/project_task_date_planned COPY project_task_deadline_from_project /mnt/extra-addons/project_task_deadline_from_project COPY project_task_dependency_more_info /mnt/extra-addons/project_task_dependency_more_info COPY project_task_description_template /mnt/extra-addons/project_task_description_template -#COPY project_task_editable_list_stage /mnt/extra-addons/project_task_editable_list_stage COPY project_task_editable_list_view /mnt/extra-addons/project_task_editable_list_view COPY project_task_full_text_search /mnt/extra-addons/project_task_full_text_search COPY project_task_id_in_display_name /mnt/extra-addons/project_task_id_in_display_name @@ -90,9 +70,6 @@ COPY project_timesheet_analytic_update /mnt/extra-addons/project_timesheet_anal COPY project_type /mnt/extra-addons/project_type COPY project_wip /mnt/extra-addons/project_wip COPY project_wip_material /mnt/extra-addons/project_wip_material -#COPY project_wip_outsourcing /mnt/extra-addons/project_wip_outsourcing -#COPY project_wip_supply_cost /mnt/extra-addons/project_wip_supply_cost -#COPY project_wip_timesheet /mnt/extra-addons/project_wip_timesheet COPY stock_location_production /mnt/extra-addons/stock_location_production COPY timesheet_task_project_no_change /mnt/extra-addons/timesheet_task_project_no_change diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/docker-compose.yml b/docker-compose.yml index 991596b0..dd776aa8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,13 +30,6 @@ services: expose: - 5432 - testcafe: - build: - context: .testcafe - dockerfile: Dockerfile - depends_on: - - odoo - volumes: odoo-web-data: odoo-db-data: diff --git a/project_enhanced/models/project.py b/project_enhanced/models/project.py index e5ffda2b..c9b49097 100644 --- a/project_enhanced/models/project.py +++ b/project_enhanced/models/project.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import fields, models, api +from odoo import fields, models class Project(models.Model): diff --git a/project_enhanced/models/project_task.py b/project_enhanced/models/project_task.py index efcf9cd8..d2b316b9 100644 --- a/project_enhanced/models/project_task.py +++ b/project_enhanced/models/project_task.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import fields, models, api +from odoo import fields, models class ProjectTask(models.Model): diff --git a/project_iteration/tests/test_followers_propagation.py b/project_iteration/tests/test_followers_propagation.py index d094e85e..2fbbc451 100644 --- a/project_iteration/tests/test_followers_propagation.py +++ b/project_iteration/tests/test_followers_propagation.py @@ -1,7 +1,6 @@ # © 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -import pytest from .common import ProjectIterationCase diff --git a/project_iteration_parent_only/__init__.py b/project_iteration_parent_only/__init__.py index a83e39a7..ae201b3e 100644 --- a/project_iteration_parent_only/__init__.py +++ b/project_iteration_parent_only/__init__.py @@ -1,3 +1,2 @@ # © 2023 - Today Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - diff --git a/project_material/models/project_task_material.py b/project_material/models/project_task_material.py index 6eb7d784..ae759856 100644 --- a/project_material/models/project_task_material.py +++ b/project_material/models/project_task_material.py @@ -238,8 +238,8 @@ def _check_quantity_can_be_reduced(self): if more_to_reduce_than_available: raise ValidationError( _( - "The quantity on the material line {line} can not be reduced to {new_quantity} " - "(it can not be lower than the delivered quantity).\n\n" + "The quantity on the material line {line} can not be reduced to " + "{new_quantity} (it can not be lower than the delivered quantity).\n\n" "The line may not be reduced below a minimum of {minimum_qty} {uom}." ).format( line=self.product_id.display_name, @@ -288,12 +288,12 @@ def _get_total_move_qty(self): ) def _get_first_step_moves(self): - moves = self.env["stock.move"] + _moves = self.env["stock.move"] - for moves in self._iter_procurement_moves(): + for _moves in self._iter_procurement_moves(): pass - return moves + return _moves def _cancel_moves_with_zero_quantity(self): """Cancel the stock moves related to this line with zero quantity. diff --git a/project_material/models/stock_warehouse.py b/project_material/models/stock_warehouse.py index 54b38ada..4b97ba03 100644 --- a/project_material/models/stock_warehouse.py +++ b/project_material/models/stock_warehouse.py @@ -1,7 +1,7 @@ # Copyright 2024 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, fields, models, SUPERUSER_ID, _ +from odoo import api, fields, models, _ ONE_STEP_KEY = "one_step" diff --git a/project_milestone_enhanced/models/project_milestone.py b/project_milestone_enhanced/models/project_milestone.py index fff93a39..e766ee2b 100644 --- a/project_milestone_enhanced/models/project_milestone.py +++ b/project_milestone_enhanced/models/project_milestone.py @@ -1,7 +1,7 @@ # © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, models, fields +from odoo import models, fields class ProjectMilestone(models.Model): diff --git a/project_milestone_enhanced/tests/test_project.py b/project_milestone_enhanced/tests/test_project.py index 984f5a46..9b6e39b2 100644 --- a/project_milestone_enhanced/tests/test_project.py +++ b/project_milestone_enhanced/tests/test_project.py @@ -41,7 +41,7 @@ def test_copy_project(self): project = self.project.copy({}) tasks = project.with_context(active_test=False).task_ids milestone = project.milestone_ids.filtered( - lambda milestone: not "2" in milestone.name + lambda milestone: "2" not in milestone.name ) assert tasks[0].milestone_id == milestone and tasks[1].milestone_id == milestone diff --git a/project_milestone_time_report/tests/test_project_milestone_time_report.py b/project_milestone_time_report/tests/test_project_milestone_time_report.py index 2dc7e093..95ebb677 100644 --- a/project_milestone_time_report/tests/test_project_milestone_time_report.py +++ b/project_milestone_time_report/tests/test_project_milestone_time_report.py @@ -32,36 +32,36 @@ def setUpClass(cls): "project_id": cls.lot.id, }) cls.task_a = cls.env["project.task"].create({ - "name": "Task A", - "project_id": cls.lot.id, - "milestone_id": cls.milestone_a.id, - "planned_hours": 4, - "stage_id": cls.folded_stage.id, + "name": "Task A", + "project_id": cls.lot.id, + "milestone_id": cls.milestone_a.id, + "planned_hours": 4, + "stage_id": cls.folded_stage.id, }) cls.task_b = cls.env["project.task"].create({ - "name": "Task B", - "project_id": cls.lot.id, - "milestone_id": cls.milestone_b.id, - "planned_hours": 8, - "stage_id": cls.folded_stage.id, - }) + "name": "Task B", + "project_id": cls.lot.id, + "milestone_id": cls.milestone_b.id, + "planned_hours": 8, + "stage_id": cls.folded_stage.id, + }) # Add timelines to created tasks cls.timesheet_a = cls.env["account.analytic.line"].create({ - "name": "Analyse", - "project_id": cls.lot.id, - "task_id": cls.task_a.id, - "unit_amount": 3, - "employee_id": 1, - "date": "2022-06-25", - }) + "name": "Analyse", + "project_id": cls.lot.id, + "task_id": cls.task_a.id, + "unit_amount": 3, + "employee_id": 1, + "date": "2022-06-25", + }) cls.timesheet_b = cls.env["account.analytic.line"].create({ - "name": "Conception", - "project_id": cls.lot.id, - "task_id": cls.task_b.id, - "unit_amount": 4, - "employee_id": 1, - "date": "2022-06-30", - }) + "name": "Conception", + "project_id": cls.lot.id, + "task_id": cls.task_b.id, + "unit_amount": 4, + "employee_id": 1, + "date": "2022-06-30", + }) cls.report = cls.env["project.milestone.time.report"] def test_amounts(self): diff --git a/project_outsourcing/models/project_task.py b/project_outsourcing/models/project_task.py index e62def57..24918959 100644 --- a/project_outsourcing/models/project_task.py +++ b/project_outsourcing/models/project_task.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, fields, models, _ +from odoo import fields, models, _ from odoo.exceptions import ValidationError diff --git a/project_outsourcing/models/purchase_order_line.py b/project_outsourcing/models/purchase_order_line.py index 278043f5..83006686 100644 --- a/project_outsourcing/models/purchase_order_line.py +++ b/project_outsourcing/models/purchase_order_line.py @@ -20,7 +20,6 @@ def _prepare_account_move_line(self, move=False): result["task_id"] = self.order_id.task_id.id return result - @api.constrains("is_outsourcing", "product_id") def _check_if_is_outsourcing__product_is_service(self): outsourcing_lines = self.filtered(lambda l: l.is_outsourcing) diff --git a/project_outsourcing/tests/test_project_task.py b/project_outsourcing/tests/test_project_task.py index e1a562a0..6b3f126c 100644 --- a/project_outsourcing/tests/test_project_task.py +++ b/project_outsourcing/tests/test_project_task.py @@ -13,7 +13,7 @@ def setUpClass(cls): def test_outsourcing_line_ids(self): self.task.outsourcing_line_ids.refresh() assert self.task.outsourcing_line_ids == ( - self.order.order_line | self.order_2.order_line + self.order.order_line | self.order_2.order_line ) def test_outsourcing_po_count(self): diff --git a/project_outsourcing_timesheet_automation/models/project_task.py b/project_outsourcing_timesheet_automation/models/project_task.py index f6cc05a3..23aa4d4a 100644 --- a/project_outsourcing_timesheet_automation/models/project_task.py +++ b/project_outsourcing_timesheet_automation/models/project_task.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import models, api, fields, _ +from odoo import models, fields, _ from datetime import datetime @@ -24,11 +24,11 @@ class ProjectTask(models.Model): def _check_outsourcing_pol(self): existing_pol = self.timesheet_ids.mapped('purchase_order_line_id') outsourcing_pol = self.outsourcing_line_ids.filtered( - lambda pol: pol.order_id.is_outsourcing and - pol.state in ['purchase', 'done'] and - pol.partner_id.subcontracting_auto_time_entries and - pol.product_id.automate_time_entries and - pol.id not in existing_pol.ids + lambda pol: pol.order_id.is_outsourcing + and pol.state in ['purchase', 'done'] + and pol.partner_id.subcontracting_auto_time_entries + and pol.product_id.automate_time_entries + and pol.id not in existing_pol.ids ) if outsourcing_pol: return outsourcing_pol @@ -74,11 +74,7 @@ def write(self, vals): for record in self: if 'stage_id' in vals and self.env['project.task.type'].browse( vals['stage_id']).create_subcontractors_time_entries: - print('====================stage name', self.env['project.task.type'].browse( - vals['stage_id']).name) outsourcing_pol = record._check_outsourcing_pol() - print('====================outsourcing_pol', - outsourcing_pol) if outsourcing_pol: record._create_timesheet_line(outsourcing_pol) return res diff --git a/project_outsourcing_timesheet_automation/models/purchase_order.py b/project_outsourcing_timesheet_automation/models/purchase_order.py index cf905949..b03eb817 100644 --- a/project_outsourcing_timesheet_automation/models/purchase_order.py +++ b/project_outsourcing_timesheet_automation/models/purchase_order.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import models, api +from odoo import models class PurchaseOrder(models.Model): diff --git a/project_outsourcing_timesheet_automation/tests/__init__.py b/project_outsourcing_timesheet_automation/tests/__init__.py index ccb86b73..0ca2c599 100644 --- a/project_outsourcing_timesheet_automation/tests/__init__.py +++ b/project_outsourcing_timesheet_automation/tests/__init__.py @@ -1,4 +1,2 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - - diff --git a/project_outsourcing_timesheet_automation/tests/test_project_task.py b/project_outsourcing_timesheet_automation/tests/test_project_task.py index 31a11111..2ab1f5f1 100644 --- a/project_outsourcing_timesheet_automation/tests/test_project_task.py +++ b/project_outsourcing_timesheet_automation/tests/test_project_task.py @@ -8,7 +8,6 @@ class TestProjectTask(OutsourcingCase): def setUp(self): super(TestProjectTask, self).setUp() - def test_create_timesheet_line_automatically(self): self.task.outsourcing_line_ids.refresh() self.task.write({"stage_id": self.stage_test.id}) diff --git a/project_stage/models/project_stage.py b/project_stage/models/project_stage.py index c4b36b5c..ce42341a 100644 --- a/project_stage/models/project_stage.py +++ b/project_stage/models/project_stage.py @@ -15,7 +15,8 @@ class ProjectStage(models.Model): active = fields.Boolean(default=True) fold = fields.Boolean( string='Folded in Kanban', - help='This stage is folded in the kanban view when there are no records in that stage to display.' + help="""This stage is folded in the kanban view when there are + no records in that stage to display.""" ) @@ -23,8 +24,10 @@ class ProjectWithStage(models.Model): _inherit = 'project.project' def compute_default_stage(self): - return self.env['project.stage'].search([('fold', '=', False)], order='sequence', limit=1).id + return self.env['project.stage'].search( + [('fold', '=', False)], order='sequence', limit=1).id stage_id = fields.Many2one( - 'project.stage', 'Stage', ondelete='restrict', index=True, default=compute_default_stage, + 'project.stage', 'Stage', ondelete='restrict', index=True, + default=compute_default_stage, tracking=True) diff --git a/project_stage_allow_timesheet/models/account_analytic_line.py b/project_stage_allow_timesheet/models/account_analytic_line.py index dd2859fa..f20e9e9d 100644 --- a/project_stage_allow_timesheet/models/account_analytic_line.py +++ b/project_stage_allow_timesheet/models/account_analytic_line.py @@ -15,8 +15,8 @@ def _check_task_project_allow_timesheet(self): return error_message = _( - "You can't link a time sheet line to a task if its project's stage does not allow it. " - "(Task: {}, Project: {}, Project Stage: {})" + "You can't link a time sheet line to a task if its project's stage" + " does not allow it. (Task: {}, Project: {}, Project Stage: {})" ) for rec in self: task = rec.task_id @@ -34,13 +34,14 @@ class ProjectTask(models.Model): @api.constrains("project_id") def _check_project_move_allow_timesheet(self): - """ Check if a line is moved to another project, the target project must allow time sheet """ + """ Check if a line is moved to another project, + the target project must allow time sheet """ if not _should_apply_constraints(self.env): return error_message = _( - "You cannot move a task linked to a timesheet line in a project if its stage does not allow it. " - "(Task: {}, Project: {}, Project Stage: {})" + "You cannot move a task linked to a timesheet line in a project if its stage" + " does not allow it. (Task: {}, Project: {}, Project Stage: {})" ) for rec in self: diff --git a/project_stage_allow_timesheet/models/project_stage.py b/project_stage_allow_timesheet/models/project_stage.py index 002f19f1..6021199b 100644 --- a/project_stage_allow_timesheet/models/project_stage.py +++ b/project_stage_allow_timesheet/models/project_stage.py @@ -13,7 +13,6 @@ class ProjectStage(models.Model): ) - class ProjectTaskType(models.Model): _inherit = 'project.task.type' @@ -22,4 +21,3 @@ class ProjectTaskType(models.Model): string="Allow timesheets", default=True, ) - diff --git a/project_task_analytic_lines/models/account_analytic_line.py b/project_task_analytic_lines/models/account_analytic_line.py index 14e74655..e066b23c 100644 --- a/project_task_analytic_lines/models/account_analytic_line.py +++ b/project_task_analytic_lines/models/account_analytic_line.py @@ -23,9 +23,8 @@ def _onchange_analytic_account_empty_task(self): def _check_origin_task_and_project_match(self): for line in self: task_not_matching_project = ( - line.origin_task_id - and line.origin_task_id.project_id.analytic_account_id - != line.account_id + line.origin_task_id + and line.origin_task_id.project_id.analytic_account_id != line.account_id ) if task_not_matching_project: raise ValidationError( diff --git a/project_task_analytic_lines/models/account_move.py b/project_task_analytic_lines/models/account_move.py index ef6634e3..97cd1094 100644 --- a/project_task_analytic_lines/models/account_move.py +++ b/project_task_analytic_lines/models/account_move.py @@ -1,8 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, models, _ -from odoo.exceptions import ValidationError +from odoo import models class AccountMove(models.Model): diff --git a/project_task_analytic_lines/models/account_move_line.py b/project_task_analytic_lines/models/account_move_line.py index c17c7597..fbc6bd52 100644 --- a/project_task_analytic_lines/models/account_move_line.py +++ b/project_task_analytic_lines/models/account_move_line.py @@ -27,8 +27,8 @@ def _prepare_analytic_line(self): def _check_task_matches_with_project(self): task_not_matching_project = ( - self.task_id - and self.task_id.project_id.analytic_account_id != self.analytic_account_id + self.task_id + and self.task_id.project_id.analytic_account_id != self.analytic_account_id ) if task_not_matching_project: raise ValidationError( diff --git a/project_task_analytic_lines/models/project_task.py b/project_task_analytic_lines/models/project_task.py index 0d70e7c0..bfe89eb4 100644 --- a/project_task_analytic_lines/models/project_task.py +++ b/project_task_analytic_lines/models/project_task.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, models, _ +from odoo import models, _ from odoo.exceptions import ValidationError diff --git a/project_task_analytic_lines/tests/common.py b/project_task_analytic_lines/tests/common.py index 7b256ff9..f4142ed7 100644 --- a/project_task_analytic_lines/tests/common.py +++ b/project_task_analytic_lines/tests/common.py @@ -54,6 +54,7 @@ def setUpClass(cls): limit=1, ) + class InvoiceCase(AccountCase): @classmethod def setUpClass(cls): @@ -78,16 +79,16 @@ def setUpClass(cls): "name": "10% tax", "amount_type": "percent", "amount": 0.10, - #"account_id": cls.tax_account.id, + # "account_id": cls.tax_account.id, } ) cls.invoice = cls.env["account.move"].create( { "partner_id": cls.partner.id, - #"project_id": cls.project.id, + # "project_id": cls.project.id, "move_type": "in_invoice", - #"account_id": cls.payable_account.id, + # "account_id": cls.payable_account.id, "invoice_line_ids": [(0, 0, cls._get_invoice_line_vals())], } ) @@ -97,7 +98,7 @@ def _get_invoice_line_vals(cls, **kwargs): defaults = { "name": "/", "quantity": 1, - #"uom_id": cls.env.ref("uom.product_uom_unit").id, + # "uom_id": cls.env.ref("uom.product_uom_unit").id, "price_unit": 100, "analytic_account_id": cls.analytic_account.id, "task_id": cls.task.id, diff --git a/project_task_full_text_search/models/project_task.py b/project_task_full_text_search/models/project_task.py index a5901407..d1dcbfaa 100644 --- a/project_task_full_text_search/models/project_task.py +++ b/project_task_full_text_search/models/project_task.py @@ -58,11 +58,14 @@ def _find_tasks_from_full_text_content(self, searched_text): self.env.cr.execute( """ SELECT id FROM project_task - WHERE to_tsvector(%(lang)s, full_text_content) @@ plainto_tsquery(%(lang)s, %(words)s); - """, { - 'lang': lang, - 'words': ' & '.join(words_to_search), - }) + WHERE to_tsvector(%(lang)s, full_text_content) @@ plainto_tsquery( + %(lang)s, %(words)s); + """, + { + "lang": lang, + "words": " & ".join(words_to_search), + }, + ) return [r[0] for r in self.env.cr.fetchall()] @@ -90,7 +93,9 @@ def _setup_content_index(self): use for the the gin index. """ _logger.info('Droping the full text search index on project_task if it exists.') - query = "DROP INDEX IF EXISTS {index_name}".format(index_name=FULL_TEXT_SEARCH_INDEX_NAME) + query = "DROP INDEX IF EXISTS {index_name}".format( + index_name=FULL_TEXT_SEARCH_INDEX_NAME + ) self.env.cr.execute(query) lang = self._get_full_text_content_language() diff --git a/project_task_id_in_display_name/controllers/portal.py b/project_task_id_in_display_name/controllers/portal.py index 40a8c7d5..15f1bdf9 100644 --- a/project_task_id_in_display_name/controllers/portal.py +++ b/project_task_id_in_display_name/controllers/portal.py @@ -13,13 +13,15 @@ class ProjectPortalWithSearchTaskByID(CustomerPortal): If the task with the given id is found, the user is redirected to the task form. """ - @http.route(['/my/tasks', '/my/tasks/page/'], type='http', auth="user", website=True) + @http.route(['/my/tasks', '/my/tasks/page/'], + type='http', auth="user", website=True) def portal_my_tasks(self, search=None, **kw): is_searching_by_task_id = isinstance(search, str) and search.strip().isdigit() if is_searching_by_task_id: task_id = search.strip() - task = http.request.env['project.task'].search([('id_string', '=', task_id)], limit=1) + task = http.request.env['project.task'].search( + [('id_string', '=', task_id)], limit=1) if task: query = urllib.parse.urlencode(dict(kw)) redirect_url = '/my/task/{task_id}?{query}'.format(task_id=task.id, query=query) diff --git a/project_task_milestone_mandatory/__manifest__.py b/project_task_milestone_mandatory/__manifest__.py index 101f56b4..2c78ad62 100644 --- a/project_task_milestone_mandatory/__manifest__.py +++ b/project_task_milestone_mandatory/__manifest__.py @@ -9,7 +9,8 @@ "website": "https://bit.ly/numigi-com", "license": "LGPL-3", "category": "Project", - "summary": "In task form view, field milestone is required if field Use milestones is True in project else invisible", + "summary": """In task form view, field milestone is required if field + Use milestones is True in project else invisible""", "depends": ["project_milestone_enhanced"], 'data': [ 'views/project_task.xml', diff --git a/project_task_reference/models/project_task.py b/project_task_reference/models/project_task.py index 7f72f13d..2628b327 100644 --- a/project_task_reference/models/project_task.py +++ b/project_task_reference/models/project_task.py @@ -12,15 +12,15 @@ def _get_task_ref_regex(env: 'Environment') -> str: return ( - env['ir.config_parameter'].sudo().get_param('project_task_reference.regex') or - DEFAULT_TASK_REF_REGEX + env["ir.config_parameter"].sudo().get_param("project_task_reference.regex") + or DEFAULT_TASK_REF_REGEX ) def _get_task_ref_normalized_format(env: 'Environment') -> str: return ( - env['ir.config_parameter'].sudo().get_param('project_task_reference.format') or - DEFAULT_TASK_REF_FORMAT + env["ir.config_parameter"].sudo().get_param("project_task_reference.format") + or DEFAULT_TASK_REF_FORMAT ) diff --git a/project_task_reference/tests/test_project_task.py b/project_task_reference/tests/test_project_task.py index 396be7ac..a2f093bc 100644 --- a/project_task_reference/tests/test_project_task.py +++ b/project_task_reference/tests/test_project_task.py @@ -66,10 +66,11 @@ def test_search_references_from_text(self): def test_if_task_id_wongly_named__raise_missing_error(self): regex_with_typo = r"TA#(?P\d+)" # task_id instead of id - self.env['ir.config_parameter'].set_param('project_task_reference.regex', regex_with_typo) - + self.env['ir.config_parameter'].set_param( + 'project_task_reference.regex', regex_with_typo) format_with_typo = "TA#{task_id}" - self.env['ir.config_parameter'].set_param('project_task_reference.format', format_with_typo) + self.env['ir.config_parameter'].set_param( + 'project_task_reference.format', format_with_typo) text = "TA#{} Some text".format(self.task_1.id) diff --git a/project_task_resource_type/__init__.py b/project_task_resource_type/__init__.py index 48a864bd..fd8d2296 100644 --- a/project_task_resource_type/__init__.py +++ b/project_task_resource_type/__init__.py @@ -1,4 +1,4 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from . import models \ No newline at end of file +from . import models diff --git a/project_task_resource_type/__manifest__.py b/project_task_resource_type/__manifest__.py index 2777a8a3..be4ccd99 100644 --- a/project_task_resource_type/__manifest__.py +++ b/project_task_resource_type/__manifest__.py @@ -10,7 +10,7 @@ "author": "Numigi", "maintainer": "Numigi", "website": "www.numigi.com", - "depends": ["project",], + "depends": ["project"], "data": [ "security/ir.model.access.csv", "views/project_resource_views.xml", diff --git a/project_task_resource_type/models/__init__.py b/project_task_resource_type/models/__init__.py index 43f22fe3..38d7a5c7 100644 --- a/project_task_resource_type/models/__init__.py +++ b/project_task_resource_type/models/__init__.py @@ -2,4 +2,4 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from . import project_resource -from . import project_task \ No newline at end of file +from . import project_task diff --git a/project_task_stage_external_mail/models/project_task.py b/project_task_stage_external_mail/models/project_task.py index da1be8a4..decbb2a2 100644 --- a/project_task_stage_external_mail/models/project_task.py +++ b/project_task_stage_external_mail/models/project_task.py @@ -1,7 +1,7 @@ # © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). import logging -from odoo import models, api, fields +from odoo import models, fields _logger = logging.getLogger(__name__) @@ -19,5 +19,6 @@ def _track_template(self, changes): res = super(ProjectTask, self)._track_template(changes) test_task = self[0] if 'stage_id' in res and test_task.stage_id.external_mail: - res['stage_id'][-1]['subtype_id'] = self.env['ir.model.data'].xmlid_to_res_id('mail.mt_comment') + res['stage_id'][-1]['subtype_id'] = self.env['ir.model.data'].xmlid_to_res_id( + 'mail.mt_comment') return res diff --git a/project_task_stage_external_mail/tests/test_project_task.py b/project_task_stage_external_mail/tests/test_project_task.py index ff7b7bdc..7be5c553 100644 --- a/project_task_stage_external_mail/tests/test_project_task.py +++ b/project_task_stage_external_mail/tests/test_project_task.py @@ -12,7 +12,8 @@ def setUpClass(cls): cls.user_demo = cls.env.ref('base.user_demo') cls.discussion_type = cls.env.ref('mail.mt_comment') cls.internal_note_type = cls.env.ref('mail.mt_note') - cls.template = cls.env.ref('project_task_stage_external_mail.demo_mail_template_task_open') + cls.template = cls.env.ref( + 'project_task_stage_external_mail.demo_mail_template_task_open') cls.project = cls.env['project.project'].create({ 'name': 'Project 1', }) @@ -53,8 +54,9 @@ def setUpClass(cls): }) def _get_sent_message(self, task): - messages = task.message_ids.filtered(lambda m: 'Task Open: ' in (m.subject or '')).sorted(key=lambda s: s.id, - reverse=True) + messages = task.message_ids.filtered( + lambda m: 'Task Open: ' in (m.subject or '')).sorted( + key=lambda s: s.id, reverse=True) return messages def _get_message_recipients(self, task): diff --git a/project_task_subtask_same_project/models/project_task.py b/project_task_subtask_same_project/models/project_task.py index 5935ff16..e09cfc2e 100644 --- a/project_task_subtask_same_project/models/project_task.py +++ b/project_task_subtask_same_project/models/project_task.py @@ -24,7 +24,8 @@ def _check_subtask_not_in_different_project(self): )) def write(self, vals): - """ Propagate the value of the project to the subtask when it is changed on the parent task.""" + """ Propagate the value of the project to the subtask when it + is changed on the parent task.""" res = super().write(vals) for task in self: if task.child_ids and 'project_id' in vals: diff --git a/project_time_budget/models/project_project.py b/project_time_budget/models/project_project.py index daf669e9..ccb60b69 100644 --- a/project_time_budget/models/project_project.py +++ b/project_time_budget/models/project_project.py @@ -42,5 +42,5 @@ def _get_parent_template_tasks(self): def _compute_budget_remaining_hours(self): for project in self: project.budget_remaining_hours = ( - project.budget_planned_hours - project.consumed_hours + project.budget_planned_hours - project.consumed_hours ) diff --git a/project_time_budget/models/project_task.py b/project_time_budget/models/project_task.py index aae7abed..8264f3d4 100644 --- a/project_time_budget/models/project_task.py +++ b/project_time_budget/models/project_task.py @@ -37,7 +37,7 @@ def write(self, vals): restored_tasks = self.filtered(lambda t: not t.active) changing_estimates = ( - "min_hours" in vals or "planned_hours" in vals or "max_hours" in vals + "min_hours" in vals or "planned_hours" in vals or "max_hours" in vals ) res = super(ProjectTask, self).write(vals) diff --git a/project_time_budget/tests/test_project.py b/project_time_budget/tests/test_project.py index 906c7e1f..be8d509a 100644 --- a/project_time_budget/tests/test_project.py +++ b/project_time_budget/tests/test_project.py @@ -2,7 +2,6 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo.tests import common -from odoo.exceptions import ValidationError class TestProject(common.SavepointCase): diff --git a/project_time_range/models/project_project.py b/project_time_range/models/project_project.py index dcce0ad4..2d9b51a0 100644 --- a/project_time_range/models/project_project.py +++ b/project_time_range/models/project_project.py @@ -1,8 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import fields, models, api, _ -from odoo.exceptions import ValidationError +from odoo import fields, models, api class ProjectProject(models.Model): diff --git a/project_time_range/tests/test_project_project.py b/project_time_range/tests/test_project_project.py index 47d5fff4..cc67c097 100644 --- a/project_time_range/tests/test_project_project.py +++ b/project_time_range/tests/test_project_project.py @@ -2,7 +2,6 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo.tests import common -from odoo.exceptions import ValidationError class TestProject(common.SavepointCase): diff --git a/project_timesheet_analytic_update/models/project_project.py b/project_timesheet_analytic_update/models/project_project.py index 3c56e6dd..21c64a70 100644 --- a/project_timesheet_analytic_update/models/project_project.py +++ b/project_timesheet_analytic_update/models/project_project.py @@ -27,9 +27,9 @@ def _onchange_account_id(self): "title": _("Warning!"), "message": _( "Please note, you have modified the analytic account. \n" - "When saving, the project timelines will be updated with the new analytic " - "account < %s >." + "When saving, the project timelines will be updated with " + "the new analytic account < %s >." ) - % self.analytic_account_id.name, + % self.analytic_account_id.name, } } diff --git a/project_timesheet_analytic_update/tests/__init__.py b/project_timesheet_analytic_update/tests/__init__.py index 82d9bb4c..0ca2c599 100644 --- a/project_timesheet_analytic_update/tests/__init__.py +++ b/project_timesheet_analytic_update/tests/__init__.py @@ -1,3 +1,2 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - diff --git a/project_wip/models/account_analytic_line.py b/project_wip/models/account_analytic_line.py index fce6b082..abbc5c71 100644 --- a/project_wip/models/account_analytic_line.py +++ b/project_wip/models/account_analytic_line.py @@ -1,7 +1,7 @@ # © 2020 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import fields, models, _ +from odoo import models, _ class AccountAnalyticLine(models.Model): diff --git a/project_wip/models/account_move_line.py b/project_wip/models/account_move_line.py index ab13218e..ef0279d3 100644 --- a/project_wip/models/account_move_line.py +++ b/project_wip/models/account_move_line.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, models +from odoo import models class AccountMoveLine(models.Model): diff --git a/project_wip/models/project_project.py b/project_wip/models/project_project.py index 273a691d..8dfc0f9d 100644 --- a/project_wip/models/project_project.py +++ b/project_wip/models/project_project.py @@ -1,7 +1,7 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, models, _ +from odoo import models, _ from odoo.exceptions import ValidationError, AccessError @@ -39,8 +39,8 @@ def check_wip_to_cgs_access(self): if not self.env.user.has_group("project_wip.group_wip_to_cgs"): raise AccessError( _( - "Only members of the group 'Transfert WIP to CGS' are allowed to transfer WIP " - "entries to CGS." + "Only members of the group 'Transfert WIP to CGS' are allowed " + "to transfer WIP entries to CGS." ) ) @@ -181,8 +181,8 @@ def _reconcile_wip_move_lines(self, wip_line, wip_reversal_line): if wip_line.matching_number == "P": raise ValidationError( _( - "The WIP entry {wip_line} ({amount}) could not be reconciled when transfering " - "the amount into Costs of Goods Sold. " + "The WIP entry {wip_line} ({amount}) could not be reconciled " + "when transfering the amount into Costs of Goods Sold. " "You should verify if the WIP entry is partially reconciled." ).format(wip_line=wip_line.display_name, amount=wip_line.balance) ) diff --git a/project_wip/models/project_type.py b/project_wip/models/project_type.py index 5a524382..5d2272eb 100644 --- a/project_wip/models/project_type.py +++ b/project_wip/models/project_type.py @@ -2,7 +2,7 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo import api, fields, models, _ -from odoo.exceptions import ValidationError, AccessError +from odoo.exceptions import ValidationError class ProjectType(models.Model): diff --git a/project_wip/tests/test_wip_to_cgs.py b/project_wip/tests/test_wip_to_cgs.py index ee61a884..7d3fb6b4 100644 --- a/project_wip/tests/test_wip_to_cgs.py +++ b/project_wip/tests/test_wip_to_cgs.py @@ -4,7 +4,6 @@ import pytest from freezegun import freeze_time from datetime import datetime, date, timedelta -from odoo import fields from odoo.tests import common from odoo.exceptions import ValidationError, AccessError diff --git a/project_wip_material/models/stock_move.py b/project_wip_material/models/stock_move.py index cdf6dcb0..45ca728d 100644 --- a/project_wip_material/models/stock_move.py +++ b/project_wip_material/models/stock_move.py @@ -27,7 +27,7 @@ def _account_entry_move(self, qty, description, svl_id, cost): else: super()._account_entry_move(qty, description, svl_id, cost) - def _prepare_account_move_line(self, qty, cost, credit_account_id, + def _prepare_account_move_line(self, qty, cost, credit_account_id, debit_account_id, description): """Add the analytic to WIP account move lines.""" move_line_vals = super()._prepare_account_move_line( @@ -57,8 +57,8 @@ def _generate_consumption_account_move(self, qty, description, svl_id, cost): wip_account = self._get_wip_account() journal_id, dummy, dummy, acc_valuation = self._get_accounting_data_for_valuation() self.with_company(self.project_id.company_id.id)._create_account_move_line( - credit_account_id=acc_valuation, - debit_account_id=wip_account.id, + credit_account_id=wip_account.id, + debit_account_id=acc_valuation, journal_id=journal_id, qty=qty, description=description, diff --git a/stock_location_production/__init__.py b/stock_location_production/__init__.py index 5073bf69..0ab5e8ea 100644 --- a/stock_location_production/__init__.py +++ b/stock_location_production/__init__.py @@ -1,3 +1,2 @@ # © 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -