Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] project_operating_unit: Migration to 18.0 #730

Open
wants to merge 27 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
26b9b67
project_operating_unit v12
nikul-serpentcs Dec 23, 2019
803c58b
Update project_operating_unit.pot
oca-travis Dec 28, 2019
13e9b3c
README.rst
OCA-git-bot Dec 28, 2019
01ea234
icon.png
OCA-git-bot Dec 28, 2019
06e9de5
res_partner_operating_unit.
Dangar-Serpentcs Dec 23, 2019
d441ff5
Added translation using Weblate (Portuguese)
pedrocs-exo Feb 29, 2020
b9cb38e
Translated using Weblate (Portuguese)
pedrocs-exo Feb 29, 2020
380bbf6
Group By Operating Unit Projects
osi-scampbell Mar 7, 2020
e7f01fa
Update project_operating_unit.pot
oca-travis Mar 17, 2020
33f2dc9
project_operating_unit 12.0.1.1.0
OCA-git-bot Mar 17, 2020
37b0c30
Update translation files
oca-transbot Mar 17, 2020
59004fb
[MIG] Migrated project_operating_unit in v13
nikul-serpentcs Aug 16, 2020
9bcb800
[FIX] pre-commit.
Murtaza-OSI Jun 25, 2021
6c526e5
[14.0][MIG] project_operating_unit.
Murtaza-OSI Jun 25, 2021
fb8b11b
[FIX] run pre-commit for solve issue
Urvisha-OSI Nov 4, 2022
6115aee
Update translation files
weblate Jan 17, 2023
b40fe50
[MIG] project_operating_unit: migration to 15.0
huguesdk Mar 17, 2023
d726480
[MIG] project_operating_unit: migration to 16.0
huguesdk Mar 17, 2023
cf8e30f
Update translation files
weblate Aug 15, 2023
9bb1816
Added translation using Weblate (Italian)
mymage Jan 18, 2024
fc206a5
Translated using Weblate (Italian)
mymage Jan 19, 2024
a7c5dd3
[IMP] project_operating_unit: pre-commit auto fixes
traitrantrobz Jun 26, 2024
b892952
[MIG] project_operating_unit: Migration to 17.0
traitrantrobz Jun 27, 2024
667ad02
[UPD] Update project_operating_unit.pot
Jul 19, 2024
37a3937
[BOT] post-merge updates
OCA-git-bot Jul 19, 2024
6aab378
[IMP] project_operating_unit: pre-commit auto fixes
HeliconiaSolutions Jan 8, 2025
8d020a5
[MIG] project_operating_unit: Migration to 18.0
HeliconiaSolutions Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions project_operating_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
============================
Project with Operating Units
============================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Foperating--unit-lightgray.png?logo=github
:target: https://github.com/OCA/operating-unit/tree/18.0/project_operating_unit
:alt: OCA/operating-unit
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/operating-unit-18-0/operating-unit-18-0-project_operating_unit
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/operating-unit&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds operating unit information to projects and tasks.

**Table of contents**

.. contents::
:local:

Usage
=====

- Go to Project
- You only see the projects and tasks of your operating units
- Create a new project. It is assigned to your default operating unit.
- Create a task within a project. It inherits the operating unit of the
project.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/operating-unit/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/operating-unit/issues/new?body=module:%20project_operating_unit%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Open Source Integrators
* Serpent Consulting Services Pvt. Ltd.

Contributors
------------

- Nikul Chaudhary <nikul.chaudhary.serpentcs@gmail.com>
- Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
- Murtaza Mithaiwala <mmithaiwala@opensourceintegrators.com>
- Tran Thanh Trai <traitt@trobz.com>
- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

Other credits
-------------

- Open Source Integrators
- Serpent Consulting Services Pvt. Ltd.

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-max3903|

This module is part of the `OCA/operating-unit <https://github.com/OCA/operating-unit/tree/18.0/project_operating_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions project_operating_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models
26 changes: 26 additions & 0 deletions project_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2019 Open Source Integrators
# Copyright (C) 2019 Serpent Consulting Services
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project with Operating Units",
"summary": """
This module adds operating unit information to projects and tasks.""",
"version": "18.0.1.0.0",
"author": "Open Source Integrators, "
"Serpent Consulting Services Pvt. Ltd., "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/operating-unit",
"category": "Project",
"depends": [
"operating_unit",
"project",
],
"license": "AGPL-3",
"data": [
"security/project_security.xml",
"views/project_project.xml",
"views/project_task.xml",
],
"development_status": "Beta",
"maintainers": ["max3903"],
}
34 changes: 34 additions & 0 deletions project_operating_unit/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-19 07:35+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: project_operating_unit
#: model:ir.model.fields,field_description:project_operating_unit.field_project_project__operating_unit_id
#: model:ir.model.fields,field_description:project_operating_unit.field_project_task__operating_unit_id
#: model_terms:ir.ui.view,arch_db:project_operating_unit.project_group_by_ou
msgid "Operating Unit"
msgstr "Unità operativa"

#. module: project_operating_unit
#: model:ir.model,name:project_operating_unit.model_project_project
msgid "Project"
msgstr "Progetto"

#. module: project_operating_unit
#: model:ir.model,name:project_operating_unit.model_project_task
msgid "Task"
msgstr "Lavoro"
31 changes: 31 additions & 0 deletions project_operating_unit/i18n/project_operating_unit.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: project_operating_unit
#: model:ir.model.fields,field_description:project_operating_unit.field_project_project__operating_unit_id
#: model:ir.model.fields,field_description:project_operating_unit.field_project_task__operating_unit_id
#: model_terms:ir.ui.view,arch_db:project_operating_unit.project_group_by_ou
msgid "Operating Unit"
msgstr ""

#. module: project_operating_unit
#: model:ir.model,name:project_operating_unit.model_project_project
msgid "Project"
msgstr ""

#. module: project_operating_unit
#: model:ir.model,name:project_operating_unit.model_project_task
msgid "Task"
msgstr ""
34 changes: 34 additions & 0 deletions project_operating_unit/i18n/pt.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-29 15:13+0000\n"
"Last-Translator: Pedro Castro Silva <pedrocs@exo.pt>\n"
"Language-Team: none\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: project_operating_unit
#: model:ir.model.fields,field_description:project_operating_unit.field_project_project__operating_unit_id
#: model:ir.model.fields,field_description:project_operating_unit.field_project_task__operating_unit_id
#: model_terms:ir.ui.view,arch_db:project_operating_unit.project_group_by_ou
msgid "Operating Unit"
msgstr "Unidade Operacional"

#. module: project_operating_unit
#: model:ir.model,name:project_operating_unit.model_project_project
msgid "Project"
msgstr "Projeto"

#. module: project_operating_unit
#: model:ir.model,name:project_operating_unit.model_project_task
msgid "Task"
msgstr "Tarefa"
3 changes: 3 additions & 0 deletions project_operating_unit/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import project_project
from . import project_task
16 changes: 16 additions & 0 deletions project_operating_unit/models/project_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) 2019 Open Source Integrators
# Copyright (C) 2019 Serpent Consulting Services
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class ProjectProject(models.Model):
_inherit = "project.project"

operating_unit_id = fields.Many2one(
comodel_name="operating.unit",
string="Operating Unit",
default=lambda self: self.env["res.users"]._get_default_operating_unit(
self._uid
),
)
14 changes: 14 additions & 0 deletions project_operating_unit/models/project_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (C) 2019 Open Source Integrators
# Copyright (C) 2019 Serpent Consulting Services
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class ProjectTask(models.Model):
_inherit = "project.task"

operating_unit_id = fields.Many2one(
comodel_name="operating.unit",
related="project_id.operating_unit_id",
string="Operating Unit",
)
3 changes: 3 additions & 0 deletions project_operating_unit/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions project_operating_unit/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Nikul Chaudhary \<<nikul.chaudhary.serpentcs@gmail.com>\>
- Maxime Chambreuil \<<mchambreuil@opensourceintegrators.com>\>
- Murtaza Mithaiwala \<<mmithaiwala@opensourceintegrators.com>\>
- Tran Thanh Trai \<<traitt@trobz.com>\>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_
2 changes: 2 additions & 0 deletions project_operating_unit/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Open Source Integrators
- Serpent Consulting Services Pvt. Ltd.
1 change: 1 addition & 0 deletions project_operating_unit/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module adds operating unit information to projects and tasks.
5 changes: 5 additions & 0 deletions project_operating_unit/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Go to Project
- You only see the projects and tasks of your operating units
- Create a new project. It is assigned to your default operating unit.
- Create a task within a project. It inherits the operating unit of the
project.
31 changes: 31 additions & 0 deletions project_operating_unit/security/project_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<odoo>
<!-- Copyright (C) 2019 Open Source Integrators
Copyright (C) 2019 Serpent Consulting Services
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<record id="ir_rule_project_project_operating_unit" model="ir.rule">
<field name="model_id" ref="project.model_project_project" />
<field
name="domain_force"
>['|', ('operating_unit_id','=',False), ('operating_unit_id','in',operating_unit_ids)]
</field>
<field name="name">Project Operating Unit</field>
<field name="global" eval="True" />
<field name="perm_unlink" eval="0" />
<field name="perm_write" eval="0" />
<field name="perm_read" eval="1" />
<field name="perm_create" eval="0" />
</record>
<record id="ir_rule_project_task_operating_unit" model="ir.rule">
<field name="model_id" ref="project.model_project_task" />
<field
name="domain_force"
>['|', ('operating_unit_id','=',False), ('operating_unit_id','in',operating_unit_ids)]
</field>
<field name="name">Project Task Operating Unit</field>
<field name="global" eval="True" />
<field name="perm_unlink" eval="0" />
<field name="perm_write" eval="0" />
<field name="perm_read" eval="1" />
<field name="perm_create" eval="0" />
</record>
</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading