Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by dreispt
- Loading branch information
Showing
28 changed files
with
1,804 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
=========== | ||
Project key | ||
=========== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-LGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
:alt: License: LGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github | ||
:target: https://github.com/OCA/project/tree/15.0/project_key | ||
:alt: OCA/project | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_key | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/140/15.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module provides functionality to uniquely identify projects and tasks by simple ``key`` field. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To use this module functionality you just need to: | ||
|
||
On ``project.project`` level: | ||
|
||
In Kanban View: | ||
|
||
#. Go to Project > Dashboard | ||
#. Create | ||
#. Enter project name and use auto generated key or simply override value by entering your own key value. | ||
|
||
In Tree View: | ||
|
||
#. Go to Project > Configuration > Projects | ||
#. Create | ||
#. Enter project name and use auto generated key or simply override value by entering your own key value. | ||
|
||
In form View: | ||
|
||
#. Go to Project > Dashboard | ||
#. Open the projects settings | ||
#. Modify the "key" value | ||
#. After modifying project key the key of any existing tasks related to that project will be updated automatically. | ||
|
||
When you create a project, under the hood a ir.sequence record gets creted with prefix: ``<project-key>-``. | ||
|
||
On ``project.task`` level: | ||
|
||
#. Actually there is nothing to be done here | ||
#. Task keys are auto generated based on project key value with per project auto incremented number (i.e. PA-1, PA-2, etc) | ||
|
||
In browser address bar: | ||
|
||
#. Navigate to your project by entering following url: http://<<your-domain>>/projects/PROJECT-KEY | ||
#. Navigate to your task by entering following url: http://<<your-domain>>/tasks/TASK-KEY | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_key%0Aversion:%2015.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 | ||
~~~~~~~ | ||
|
||
* Modoolar | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Petar Najman <petar.najman@modoolar.com> | ||
* Sladjan Kantar <sladjan.kantar@modoolar.com> | ||
* `CorporateHub <https://corporatehub.eu/>`__ | ||
|
||
* Alexey Pelykh <alexey.pelykh@corphub.eu> | ||
|
||
* Saran Lim. <saranl@ecosoft.co.th> | ||
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/project <https://github.com/OCA/project/tree/15.0/project_key>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). | ||
|
||
from . import models | ||
from . import controllers | ||
from .hooks import post_init_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2017 - 2018 Modoolar <info@modoolar.com> | ||
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). | ||
|
||
{ | ||
"name": "Project Key", | ||
"summary": "Module decorates projects and tasks with Project Key", | ||
"category": "Project", | ||
"version": "16.0.1.0.0", | ||
"license": "LGPL-3", | ||
"author": "Modoolar, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/project", | ||
"depends": ["project"], | ||
"data": ["views/project_key_views.xml"], | ||
"post_init_hook": "post_init_hook", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). | ||
|
||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2017 - 2018 Modoolar <info@modoolar.com> | ||
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). | ||
|
||
import werkzeug | ||
|
||
from odoo import http | ||
|
||
# from odoo.http import request | ||
|
||
|
||
class ProjectBrowser(http.Controller): | ||
def get_record_url(self, model, domain, action_xml_id): | ||
env = http.request.env() | ||
|
||
records = env[model].search(domain) | ||
record_id = records and records.id or -1 | ||
action_id = env.ref(action_xml_id).id | ||
|
||
return "/web#id={}&view_type=form&model={}&action={}".format( | ||
record_id, model, action_id | ||
) | ||
|
||
def get_task_url(self, key): | ||
return self.get_record_url( | ||
"project.task", [("key", "=ilike", key)], "project.action_view_task" | ||
) | ||
|
||
def get_project_url(self, key): | ||
return self.get_record_url( | ||
"project.project", | ||
[("key", "=ilike", key)], | ||
"project.open_view_project_all_config", | ||
) | ||
|
||
@http.route(["/projects/<string:key>"], type="http", auth="user") | ||
def open_project(self, key, **kwargs): | ||
return werkzeug.utils.redirect(self.get_project_url(key), 301) | ||
|
||
@http.route(["/tasks/<string:key>"], type="http", auth="user") | ||
def open_task(self, key, **kwargs): | ||
return werkzeug.utils.redirect(self.get_task_url(key), 301) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2017 - 2018 Modoolar <info@modoolar.com> | ||
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
from odoo import SUPERUSER_ID, api | ||
|
||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
env["project.project"]._set_default_project_key() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_key | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2019-07-12 15:43+0000\n" | ||
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n" | ||
"Language-Team: none\n" | ||
"Language: de\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.7.1\n" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__display_name | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__id | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__key | ||
msgid "Key" | ||
msgstr "Nummerierungsmuster" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__task_key_sequence_id | ||
msgid "Key Sequence" | ||
msgstr "Musterfolge" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project____last_update | ||
#: model:ir.model.fields,field_description:project_key.field_project_task____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: project_key | ||
#: model:ir.model.constraint,message:project_key.constraint_project_project_project_key_unique | ||
msgid "Project key must be unique" | ||
msgstr "Das Nummerierungsmuster für Projekte muss eindeutig sein." | ||
|
||
#. module: project_key | ||
#: code:addons/project_key/models/project_project.py:0 | ||
#, python-format | ||
msgid "Project task sequence for project" | ||
msgstr "" | ||
|
||
#. module: project_key | ||
#: model:ir.model,name:project_key.model_project_task | ||
msgid "Task" | ||
msgstr "Aufgabe" | ||
|
||
#. module: project_key | ||
#: model:ir.model.constraint,message:project_key.constraint_project_task_task_key_unique | ||
msgid "Task key must be unique!" | ||
msgstr "Aufgabennummerierung muss eindeutig sein!" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__url | ||
msgid "URL" | ||
msgstr "URL" | ||
|
||
#. module: project_key | ||
#: model:ir.model,name:project_key.model_project_project | ||
msgid "WBS element" | ||
msgstr "" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__key | ||
msgid "key" | ||
msgstr "Nummer" | ||
|
||
#~ msgid "Project" | ||
#~ msgstr "Projekt" | ||
|
||
#, python-format | ||
#~ msgid "Project task sequence for project " | ||
#~ msgstr "Aufgabennummerierung für Projekt " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_key | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-02-21 00:08+0000\n" | ||
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n" | ||
"Language-Team: none\n" | ||
"Language: es_AR\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.14.1\n" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__display_name | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__display_name | ||
msgid "Display Name" | ||
msgstr "Mostrar Nombre" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__id | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__key | ||
msgid "Key" | ||
msgstr "Clave" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project__task_key_sequence_id | ||
msgid "Key Sequence" | ||
msgstr "Secuencia de la Clave" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_project____last_update | ||
#: model:ir.model.fields,field_description:project_key.field_project_task____last_update | ||
msgid "Last Modified on" | ||
msgstr "Última Modificación el" | ||
|
||
#. module: project_key | ||
#: model:ir.model.constraint,message:project_key.constraint_project_project_project_key_unique | ||
msgid "Project key must be unique" | ||
msgstr "La clave del proyecto debe ser única" | ||
|
||
#. module: project_key | ||
#: code:addons/project_key/models/project_project.py:0 | ||
#, python-format | ||
msgid "Project task sequence for project" | ||
msgstr "Secuencia de tareas del proyecto para el proyecto" | ||
|
||
#. module: project_key | ||
#: model:ir.model,name:project_key.model_project_task | ||
msgid "Task" | ||
msgstr "Tarea" | ||
|
||
#. module: project_key | ||
#: model:ir.model.constraint,message:project_key.constraint_project_task_task_key_unique | ||
msgid "Task key must be unique!" | ||
msgstr "¡La clave de la tarea debe ser única!" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__url | ||
msgid "URL" | ||
msgstr "URL" | ||
|
||
#. module: project_key | ||
#: model:ir.model,name:project_key.model_project_project | ||
msgid "WBS element" | ||
msgstr "Elemento WBS" | ||
|
||
#. module: project_key | ||
#: model:ir.model.fields,field_description:project_key.field_project_task__key | ||
msgid "key" | ||
msgstr "clave" | ||
|
||
#~ msgid "Project" | ||
#~ msgstr "Proyecto" |
Oops, something went wrong.