diff --git a/project_ofid/README.rst b/project_ofid/README.rst new file mode 100644 index 00000000..dd3cb0b5 --- /dev/null +++ b/project_ofid/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============ +Project ofid +============ + +* In project type new field "Is OFID?". +* In project new nenu "OFID Project". + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/project_ofid/__init__.py b/project_ofid/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/project_ofid/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/project_ofid/__manifest__.py b/project_ofid/__manifest__.py new file mode 100644 index 00000000..fa2003f2 --- /dev/null +++ b/project_ofid/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2026 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Project Ofid", + "version": "16.0.1.0.0", + "category": "Services/Project", + "license": "AGPL-3", + "author": "AvanzOSC", + "website": "https://github.com/avanzosc/project-addons", + "depends": [ + "project_type_sequence", + ], + "data": [ + "views/project_type_views.xml", + "views/project_project_views.xml", + ], + "installable": True, +} diff --git a/project_ofid/i18n/ca_ES.po b/project_ofid/i18n/ca_ES.po new file mode 100644 index 00000000..c74089ee --- /dev/null +++ b/project_ofid/i18n/ca_ES.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_ofid +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-14 10:35+0000\n" +"PO-Revision-Date: 2024-10-14 10:35+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_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "" +"Create projects to organize your tasks. Define a different workflow for each" +" project." +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is NOT OFID" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is OFID" +msgstr "" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_type__ofid +msgid "Is OFID?" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "No projects found. Let's create one!" +msgstr "" + +#. module: project_ofid +#: model:ir.ui.menu,name:project_ofid.menu_ofi_project +msgid "OFID Project" +msgstr "" + +#. module: project_ofid +#: model:ir.actions.act_window,name:project_ofid.action_ofid_project +msgid "OFID Projects" +msgstr "" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_project +msgid "Project" +msgstr "Projecte" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_type +msgid "Project Type" +msgstr "Tipus de Projectes" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__type_id +msgid "Type" +msgstr "Tipus" diff --git a/project_ofid/i18n/en_GB.po b/project_ofid/i18n/en_GB.po new file mode 100644 index 00000000..1f5f235c --- /dev/null +++ b/project_ofid/i18n/en_GB.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_ofid +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-14 10:35+0000\n" +"PO-Revision-Date: 2024-10-14 10:35+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_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "" +"Create projects to organize your tasks. Define a different workflow for each" +" project." +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is NOT OFID" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is OFID" +msgstr "" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_type__ofid +msgid "Is OFID?" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "No projects found. Let's create one!" +msgstr "" + +#. module: project_ofid +#: model:ir.ui.menu,name:project_ofid.menu_ofi_project +msgid "OFID Project" +msgstr "" + +#. module: project_ofid +#: model:ir.actions.act_window,name:project_ofid.action_ofid_project +msgid "OFID Projects" +msgstr "" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_project +msgid "Project" +msgstr "" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_type +msgid "Project Type" +msgstr "" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__type_id +msgid "Type" +msgstr "" diff --git a/project_ofid/i18n/es.po b/project_ofid/i18n/es.po new file mode 100644 index 00000000..e06f7eb8 --- /dev/null +++ b/project_ofid/i18n/es.po @@ -0,0 +1,71 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_ofid +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-14 10:36+0000\n" +"PO-Revision-Date: 2024-10-14 10:36+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_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "" +"Create projects to organize your tasks. Define a different workflow for each" +" project." +msgstr "" +"Cree proyectos para organizar sus tareas y defina un flujo de trabajo " +"diferente para cada proyecto." + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is NOT OFID" +msgstr "NO Es OFID" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is OFID" +msgstr "Es OFID" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_type__ofid +msgid "Is OFID?" +msgstr "¿Es OFID?" + +#. module: project_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "No projects found. Let's create one!" +msgstr "No se encontraron proyectos. ¡Creemos uno!" + +#. module: project_ofid +#: model:ir.ui.menu,name:project_ofid.menu_ofi_project +msgid "OFID Project" +msgstr "Proyecto OFID" + +#. module: project_ofid +#: model:ir.actions.act_window,name:project_ofid.action_ofid_project +msgid "OFID Projects" +msgstr "Proyectos OFID" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_project +msgid "Project" +msgstr "Proyecto" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_type +msgid "Project Type" +msgstr "Tipos de Proyectos" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__type_id +msgid "Type" +msgstr "Tipo" diff --git a/project_ofid/i18n/fr.po b/project_ofid/i18n/fr.po new file mode 100644 index 00000000..222d0338 --- /dev/null +++ b/project_ofid/i18n/fr.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_ofid +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-14 10:35+0000\n" +"PO-Revision-Date: 2024-10-14 10:35+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_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "" +"Create projects to organize your tasks. Define a different workflow for each" +" project." +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is NOT OFID" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is OFID" +msgstr "" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_type__ofid +msgid "Is OFID?" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "No projects found. Let's create one!" +msgstr "" + +#. module: project_ofid +#: model:ir.ui.menu,name:project_ofid.menu_ofi_project +msgid "OFID Project" +msgstr "" + +#. module: project_ofid +#: model:ir.actions.act_window,name:project_ofid.action_ofid_project +msgid "OFID Projects" +msgstr "" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_project +msgid "Project" +msgstr "Projet" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_type +msgid "Project Type" +msgstr "Type de projet" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__type_id +msgid "Type" +msgstr "" diff --git a/project_ofid/i18n/project_ofid.pot b/project_ofid/i18n/project_ofid.pot new file mode 100644 index 00000000..3e797f61 --- /dev/null +++ b/project_ofid/i18n/project_ofid.pot @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_ofid +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-10-14 10:34+0000\n" +"PO-Revision-Date: 2024-10-14 10: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_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "" +"Create projects to organize your tasks. Define a different workflow for each" +" project." +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is NOT OFID" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.ui.view,arch_db:project_ofid.project_type_search +msgid "Is OFID" +msgstr "" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_type__ofid +msgid "Is OFID?" +msgstr "" + +#. module: project_ofid +#: model_terms:ir.actions.act_window,help:project_ofid.action_ofid_project +msgid "No projects found. Let's create one!" +msgstr "" + +#. module: project_ofid +#: model:ir.ui.menu,name:project_ofid.menu_ofi_project +msgid "OFID Project" +msgstr "" + +#. module: project_ofid +#: model:ir.actions.act_window,name:project_ofid.action_ofid_project +msgid "OFID Projects" +msgstr "" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_project +msgid "Project" +msgstr "" + +#. module: project_ofid +#: model:ir.model,name:project_ofid.model_project_type +msgid "Project Type" +msgstr "" + +#. module: project_ofid +#: model:ir.model.fields,field_description:project_ofid.field_project_project__type_id +msgid "Type" +msgstr "" diff --git a/project_ofid/models/__init__.py b/project_ofid/models/__init__.py new file mode 100644 index 00000000..630e8ba7 --- /dev/null +++ b/project_ofid/models/__init__.py @@ -0,0 +1,2 @@ +from . import project_type +from . import project_project diff --git a/project_ofid/models/project_project.py b/project_ofid/models/project_project.py new file mode 100644 index 00000000..0166d9df --- /dev/null +++ b/project_ofid/models/project_project.py @@ -0,0 +1,27 @@ +# Copyright 2026 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ProjectProject(models.Model): + _inherit = "project.project" + + def _default_project_type_id(self): + project_type_obj = self.env["project.type"] + if "ofid" in self.env.context and self.env.context.get("ofid"): + cond = [("ofid", "=", True), ("project_ok", "=", True)] + project_type = project_type_obj.search(cond, limit=1) + if project_type: + return project_type.id + return project_type_obj + + def _default_ofid(self): + if "ofid" in self.env.context: + return self.env.context.get("ofid") + return False + + type_id = fields.Many2one( + default=_default_project_type_id, + domain="[('ofid', '=', ofid), ('project_ok', '=', True)]", + ) + ofid = fields.Boolean(string="Is OFID?", default=_default_ofid) diff --git a/project_ofid/models/project_type.py b/project_ofid/models/project_type.py new file mode 100644 index 00000000..0235142d --- /dev/null +++ b/project_ofid/models/project_type.py @@ -0,0 +1,9 @@ +# Copyright 2026 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ProjectType(models.Model): + _inherit = "project.type" + + ofid = fields.Boolean(string="Is OFID?", default=False) diff --git a/project_ofid/views/project_project_views.xml b/project_ofid/views/project_project_views.xml new file mode 100644 index 00000000..d9adb0ec --- /dev/null +++ b/project_ofid/views/project_project_views.xml @@ -0,0 +1,93 @@ + + + + project.project + + + + + + + + + + project.project + + +
+ +
+
+
+ + + Projects + project.project + [('ofid', '=', False)] + {'ofid': False} + kanban,tree,form + + + main + +

+ No projects found. Let's create one! +

+

+ Create projects to organize your tasks. Define a different workflow for each project. +

+
+
+ + + Projects + project.project + {'search_default_groupby_stage': 1,'ofid': False} + [('ofid', '=', False)] + kanban,tree,form,calendar,activity + + + main + +

+ No projects found. Let's create one! +

+

+ Projects contain tasks on the same topic, and each has its own dashboard. +

+
+
+ + + OFID Projects + project.project + [('ofid', '=', True)] + {'ofid': True} + kanban,tree,form,calendar,activity + + + main + +

+ No projects found. Let's create one! +

+

+ Create projects to organize your tasks. Define a different workflow for each project. +

+
+
+ + +
diff --git a/project_ofid/views/project_type_views.xml b/project_ofid/views/project_type_views.xml new file mode 100644 index 00000000..129f8ad7 --- /dev/null +++ b/project_ofid/views/project_type_views.xml @@ -0,0 +1,37 @@ + + + + project.type + + + + + + + + + + project.type + + + + + + + + + + project.type + + + + + + + + + diff --git a/setup/project_ofid/odoo/addons/project_ofid b/setup/project_ofid/odoo/addons/project_ofid new file mode 120000 index 00000000..95f1b99d --- /dev/null +++ b/setup/project_ofid/odoo/addons/project_ofid @@ -0,0 +1 @@ +../../../../project_ofid \ No newline at end of file diff --git a/setup/project_ofid/setup.py b/setup/project_ofid/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/project_ofid/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)