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_task_code #1409

Open
wants to merge 70 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
70 commits
Select commit Hold shift + click to select a range
c383217
[MOD] changing from odoomrp to avanzosc
oihane Oct 30, 2014
f3b8fd2
[FIX] Code error when copying a task
oihane Dec 2, 2014
e1ea9ec
[IMP] <project_task_code> adapted to OCA
oihane Jul 30, 2015
d7c2dd8
[IMP] <project_task_code> Added docstring to pre and post init-hooks
oihane Aug 3, 2015
a5a3820
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
821404d
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
8e7d18c
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
62c16fd
project_task_code module
cubells Dec 17, 2016
84d0881
[MIG] project_task_code: Migrate to 10.0
Dec 17, 2016
ab03818
Requested README changes
Jan 12, 2017
799cc8c
Requested XML change
Jan 12, 2017
02ab93d
OCA Transbot updated translations from Transifex
oca-transbot Sep 1, 2015
bb3a017
[MIG] project_task_code: Migration to 11.0
rodrigets Feb 16, 2018
ab55d46
[IMP] Implements name_get() in 'project.task'
rodrigets Apr 16, 2018
9e2f8ad
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
54dcc24
[UPD] Update project_task_code.pot
oca-travis Jun 18, 2018
aa41cbc
[MIG] project_task_code: Migration to 12.0
bouvyd Oct 29, 2018
9852e72
[MIG] project_task_code: Migration to 12.0 (fix)
alexey-pelykh Nov 21, 2018
ae598b2
[UPD] Update project_task_code.pot
oca-travis Nov 27, 2018
a605e06
Update translation files
oca-transbot Dec 9, 2018
9e7b93a
[FIX] project_task_code: invalid variable
alexey-pelykh Feb 11, 2019
59d7d58
Translated using Weblate (Galician)
mvrodriguez Feb 11, 2019
d9eeba5
[ADD] icon.png
OCA-git-bot Apr 3, 2019
60714c7
[FIX][12.0] project_task_code missing api.multi
tbaden Apr 30, 2019
07092f8
[UPD] README.rst
OCA-git-bot Jul 29, 2019
86a3d53
[13.0][MIG] project_task_code
Saran440 Oct 24, 2019
828ded4
[UPD] Update project_task_code.pot
oca-travis Oct 28, 2019
1923696
Update translation files
oca-transbot Dec 25, 2019
d6f6084
pre-commit update
OCA-git-bot Mar 14, 2020
715598b
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 8, 2020
40eb539
[UPD] README.rst
OCA-git-bot Nov 8, 2020
42de379
[14.0][MIG]project_task_code
Yoshiro009 Jan 27, 2021
bb81811
[UPD] Update project_task_code.pot
oca-travis Mar 3, 2021
74def4e
[UPD] README.rst
OCA-git-bot Mar 3, 2021
47cde31
Added translation using Weblate (Spanish (Argentina))
ibuioli Apr 1, 2021
eb1a8e5
Translated using Weblate (Spanish (Argentina))
ibuioli Apr 1, 2021
b2f2380
Added translation using Weblate (French (France))
Yvesldff Apr 11, 2021
db051b4
Translated using Weblate (French (France))
Yvesldff Apr 11, 2021
e919c05
Translated using Weblate (Spanish (Mexico))
alan196 Sep 29, 2021
4d59a52
Translated using Weblate (Swedish)
simonstromb Nov 16, 2021
2b572d8
[MIG] project_task_code : Migrate project_task_code.
bizzappdev Feb 9, 2022
4780808
[UPD] Update project_task_code.pot
Apr 5, 2022
9bf9c35
[UPD] README.rst
OCA-git-bot Apr 5, 2022
9188438
Translated using Weblate (Catalan)
Noel000 Apr 13, 2022
d3ebeeb
[FIX] project_task_code: in place argument modification
gurneyalex Oct 10, 2022
fdbdd32
project_task_code 15.0.1.0.2
OCA-git-bot Oct 10, 2022
8c57297
[15.0][FIX] project_task_code: Fix null value in column code, that vi…
yankinmax Nov 22, 2022
36dcc1f
project_task_code 15.0.1.0.3
OCA-git-bot Dec 1, 2022
7c2720d
[IMP] update dotfiles [ci skip]
OCA-git-bot Dec 11, 2022
05b00e6
[FIX] project_task_code: Make sequence avalaible for all companies
rolandojduartem Jan 13, 2023
b16d2bc
project_task_code 15.0.1.0.4
OCA-git-bot Jan 24, 2023
0fc70ea
[MIG] project_task_code: Migration to 16.0
kg-ucs Nov 2, 2022
2be5648
[FIX] project_task_code: unique code in company
robinkeunen Jan 11, 2024
8f5ed77
[UPD] Update project_task_code.pot
Jan 13, 2024
317a51a
[BOT] post-merge updates
OCA-git-bot Jan 13, 2024
7bfc07b
Update translation files
weblate Jan 14, 2024
236e7a7
Translated using Weblate (Italian)
mymage Jan 15, 2024
064b314
Translated using Weblate (Spanish)
Ivorra78 Jan 15, 2024
1a92349
Translated using Weblate (Spanish (Argentina))
ibuioli Jan 17, 2024
b675e29
[16.0][FIX]project_task_code: fix view kanban
DemchukM Jan 19, 2024
f398728
Translated using Weblate (Italian)
mymage Jan 20, 2024
d1c0485
[BOT] post-merge updates
OCA-git-bot Jan 24, 2024
e927029
Translated using Weblate (Portuguese (Brazil))
May 22, 2024
810abf9
[IMP] project_task_code Search by code in x2m
ivs-cetmix Aug 7, 2024
fb86af8
[BOT] post-merge updates
OCA-git-bot Aug 18, 2024
4630ab3
[IMP] project_task_code: pre-commit auto fixes
Oct 22, 2024
6a555a9
[MIG] project_task_code: Migration to 17.0
Oct 22, 2024
e296637
[IMP] project_task_code: pre-commit auto fixes
Oct 22, 2024
9496c12
[IMP] project_task_code: pre-commit stuff
wpichler Jan 3, 2025
4242081
[MIG] project_task_code: Migration to 18.0
wpichler Jan 3, 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
109 changes: 109 additions & 0 deletions project_task_code/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
=========================
Sequential Code for Tasks
=========================

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

.. |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/18.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-18-0/project-18-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=18.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:

1. Activate the developer mode.
2. Go to Settings > Technical > Sequences & Identifiers > Sequences.
3. 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:%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
-------

* OdooMRP team
* AvanzOSC
* Tecnativa

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

- Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
- Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
- Ana Juaristi <anajuarist@avanzosc.es>
- Vicent Cubells <vicent.cubells@tecnativa.com>
- Rodrigo Ferreira <rodrigosferreira91@gmail.com>
- Damien Bouvy <dbo@odoo.com>
- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <alexey.pelykh@corphub.eu>

- Saran Lim. <saranl@ecosoft.co.th>
- Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
- Ruchir Shukla <ruchir@bizzappdev.com>
- Nedas Žilinskas <nedas.zilinskas@avoin.systems>

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/18.0/project_task_code>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions project_task_code/__init__.py
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
24 changes: 24 additions & 0 deletions project_task_code/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2016 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sequential Code for Tasks",
"version": "18.0.1.0.0",
"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",
}
13 changes: 13 additions & 0 deletions project_task_code/data/task_sequence.xml
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>
30 changes: 30 additions & 0 deletions project_task_code/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2016 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


def pre_init_hook(env):
"""
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.
"""
env.cr.execute("ALTER TABLE project_task ADD COLUMN code character varying;")
env.cr.execute("UPDATE project_task SET code = id;")


def post_init_hook(env):
"""
This post-init-hook will update all existing task assigning them the
corresponding sequence code.
"""
task_obj = env["project.task"]
sequence_obj = env["ir.sequence"]
tasks = task_obj.search([], order="id")
for task_id in tasks.ids:
env.cr.execute(
"UPDATE project_task SET code = %s WHERE id = %s;",
(
sequence_obj.next_by_code("project.task"),
task_id,
),
)
43 changes: 43 additions & 0 deletions project_task_code/i18n/ar.po
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 ""
42 changes: 42 additions & 0 deletions project_task_code/i18n/bg.po
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 "Номерът трябва да е уникален!"
43 changes: 43 additions & 0 deletions project_task_code/i18n/ca.po
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 <noelestudilloviera@gmail.com>\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!"
42 changes: 42 additions & 0 deletions project_task_code/i18n/de.po
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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!"
Loading
Loading