forked from OCA/project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #922 from OCA/16.0
Syncing from upstream OCA/project (16.0)
- Loading branch information
Showing
60 changed files
with
2,391 additions
and
14 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
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,108 @@ | ||
========================= | ||
Sequential Code for Tasks | ||
========================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:a2c5c317ecd8fcc6e8db29ec511842dcc6c5786063fd513d9fbb097e220f1697 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github | ||
:target: https://github.com/OCA/project/tree/16.0/project_task_code | ||
:alt: OCA/project | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_code | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds a sequential code for tasks. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To change the task code sequence, you must: | ||
|
||
#. Activate the developer mode. | ||
#. Go to Settings > Technical > Sequences & Identifiers > Sequences. | ||
#. Click on "Task code" sequence to edit. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Go to menu Project > Search > Tasks and create a new task, and you get a | ||
new code saving it. | ||
#. If you duplicate a task, you will get a new code for the new task. | ||
|
||
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 to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_task_code%0Aversion:%2016.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 | ||
~~~~~~~ | ||
|
||
* OdooMRP team | ||
* AvanzOSC | ||
* Tecnativa | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Oihane Crucelaegui <[email protected]> | ||
* Pedro M. Baeza <[email protected]> | ||
* Ana Juaristi <[email protected]> | ||
* Vicent Cubells <[email protected]> | ||
* Rodrigo Ferreira <[email protected]> | ||
* Damien Bouvy <[email protected]> | ||
* `CorporateHub <https://corporatehub.eu/>`__ | ||
|
||
* Alexey Pelykh <[email protected]> | ||
|
||
* Saran Lim. <[email protected]> | ||
* Tharathip Chaweewongphan <[email protected]> | ||
* Ruchir Shukla <[email protected]> | ||
|
||
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/16.0/project_task_code>`_ 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 AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import models | ||
from .hooks import pre_init_hook | ||
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,24 @@ | ||
# Copyright 2016 Tecnativa <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Sequential Code for Tasks", | ||
"version": "16.0.1.0.1", | ||
"category": "Project Management", | ||
"author": "OdooMRP team, " | ||
"AvanzOSC, " | ||
"Tecnativa, " | ||
"Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/project", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"project", | ||
], | ||
"data": [ | ||
"data/task_sequence.xml", | ||
"views/project_view.xml", | ||
], | ||
"installable": True, | ||
"pre_init_hook": "pre_init_hook", | ||
"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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo noupdate="1"> | ||
<!-- | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<record id="sequence_task" model="ir.sequence"> | ||
<field name="name">Task code</field> | ||
<field name="code">project.task</field> | ||
<field eval="4" name="padding" /> | ||
<field name="prefix">T</field> | ||
<field name="company_id" eval="False" /> | ||
</record> | ||
</odoo> |
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,33 @@ | ||
# Copyright 2016 Tecnativa <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import SUPERUSER_ID, api | ||
|
||
|
||
def pre_init_hook(cr): | ||
""" | ||
With this pre-init-hook we want to avoid error when creating the UNIQUE | ||
code constraint when the module is installed and before the post-init-hook | ||
is launched. | ||
""" | ||
cr.execute("ALTER TABLE project_task ADD COLUMN code character varying;") | ||
cr.execute("UPDATE project_task SET code = id;") | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
""" | ||
This post-init-hook will update all existing task assigning them the | ||
corresponding sequence code. | ||
""" | ||
env = api.Environment(cr, SUPERUSER_ID, dict()) | ||
task_obj = env["project.task"] | ||
sequence_obj = env["ir.sequence"] | ||
tasks = task_obj.search([], order="id") | ||
for task_id in tasks.ids: | ||
cr.execute( | ||
"UPDATE project_task SET code = %s WHERE id = %s;", | ||
( | ||
sequence_obj.next_by_code("project.task"), | ||
task_id, | ||
), | ||
) |
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,43 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_code | ||
# | ||
# Translators: | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: project (8.0)\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2015-08-31 18:04+0000\n" | ||
"PO-Revision-Date: 2015-08-06 21:48+0000\n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: Arabic (http://www.transifex.com/oca/OCA-project-8-0/language/" | ||
"ar/)\n" | ||
"Language: ar\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " | ||
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" | ||
|
||
#. module: project_task_code | ||
#: model_terms:ir.ui.view,arch_db:project_task_code.project_task_code_form_view | ||
msgid "<span class=\"oe_inline\"> - </span>" | ||
msgstr "" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model,name:project_task_code.model_project_task | ||
msgid "Task" | ||
msgstr "مهمة" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model.fields,field_description:project_task_code.field_project_task__code | ||
msgid "Task Number" | ||
msgstr "" | ||
|
||
#. module: project_task_code | ||
#. odoo-python | ||
#: code:addons/project_task_code/models/project_task.py:0 | ||
#: model:ir.model.constraint,message:project_task_code.constraint_project_task_project_task_unique_code | ||
#, python-format | ||
msgid "The code must be unique!" | ||
msgstr "" |
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,42 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_code | ||
# | ||
# Translators: | ||
# OCA Transbot <[email protected]>, 2016 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-12-23 03:43+0000\n" | ||
"PO-Revision-Date: 2016-12-23 03:43+0000\n" | ||
"Last-Translator: OCA Transbot <[email protected]>, 2016\n" | ||
"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n" | ||
"Language: bg\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" | ||
|
||
#. module: project_task_code | ||
#: model_terms:ir.ui.view,arch_db:project_task_code.project_task_code_form_view | ||
msgid "<span class=\"oe_inline\"> - </span>" | ||
msgstr "" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model,name:project_task_code.model_project_task | ||
msgid "Task" | ||
msgstr "" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model.fields,field_description:project_task_code.field_project_task__code | ||
msgid "Task Number" | ||
msgstr "" | ||
|
||
#. module: project_task_code | ||
#. odoo-python | ||
#: code:addons/project_task_code/models/project_task.py:0 | ||
#: model:ir.model.constraint,message:project_task_code.constraint_project_task_project_task_unique_code | ||
#, python-format | ||
msgid "The code must be unique!" | ||
msgstr "Номерът трябва да е уникален!" |
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,43 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_code | ||
# | ||
# Translators: | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: project (8.0)\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2015-08-31 18:04+0000\n" | ||
"PO-Revision-Date: 2022-04-13 11:05+0000\n" | ||
"Last-Translator: Noel estudillo <[email protected]>\n" | ||
"Language-Team: Catalan (http://www.transifex.com/oca/OCA-project-8-0/" | ||
"language/ca/)\n" | ||
"Language: ca\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.3.2\n" | ||
|
||
#. module: project_task_code | ||
#: model_terms:ir.ui.view,arch_db:project_task_code.project_task_code_form_view | ||
msgid "<span class=\"oe_inline\"> - </span>" | ||
msgstr "" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model,name:project_task_code.model_project_task | ||
msgid "Task" | ||
msgstr "Tasca" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model.fields,field_description:project_task_code.field_project_task__code | ||
msgid "Task Number" | ||
msgstr "Número de tasca" | ||
|
||
#. module: project_task_code | ||
#. odoo-python | ||
#: code:addons/project_task_code/models/project_task.py:0 | ||
#: model:ir.model.constraint,message:project_task_code.constraint_project_task_project_task_unique_code | ||
#, python-format | ||
msgid "The code must be unique!" | ||
msgstr "El codi ha de ser únic!" |
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,42 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_code | ||
# | ||
# Translators: | ||
# OCA Transbot <[email protected]>, 2016 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-12-23 03:43+0000\n" | ||
"PO-Revision-Date: 2016-12-23 03:43+0000\n" | ||
"Last-Translator: OCA Transbot <[email protected]>, 2016\n" | ||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\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" | ||
|
||
#. module: project_task_code | ||
#: model_terms:ir.ui.view,arch_db:project_task_code.project_task_code_form_view | ||
msgid "<span class=\"oe_inline\"> - </span>" | ||
msgstr "" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model,name:project_task_code.model_project_task | ||
msgid "Task" | ||
msgstr "Aufgabe" | ||
|
||
#. module: project_task_code | ||
#: model:ir.model.fields,field_description:project_task_code.field_project_task__code | ||
msgid "Task Number" | ||
msgstr "Aufgaben Nummer" | ||
|
||
#. module: project_task_code | ||
#. odoo-python | ||
#: code:addons/project_task_code/models/project_task.py:0 | ||
#: model:ir.model.constraint,message:project_task_code.constraint_project_task_project_task_unique_code | ||
#, python-format | ||
msgid "The code must be unique!" | ||
msgstr "Der Schlüssel muss eindeutig sein!" |
Oops, something went wrong.