diff --git a/partner_category_description/README.rst b/partner_category_description/README.rst new file mode 100644 index 00000000000..d2c6ec30b9e --- /dev/null +++ b/partner_category_description/README.rst @@ -0,0 +1,104 @@ +============================ +Partner Category Description +============================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:6022e2042af460eb8d9e0591d14ea07fd1d1f726c56a502a5d428faf9cfc8824 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |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%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/17.0/partner_category_description + :alt: OCA/partner-contact +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_category_description + :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/partner-contact&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds a description field to contact tags. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +1. Create a Tag: Navigate to CRM > Tags and click on "Create" to add a + new tag. + +2. Add a Description: Provide a detailed explanation of the tag's + purpose and criteria in the newly added "Description" field. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Moduon + +Contributors +------------ + +- Eduardo López (`Moduon `__) +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia + +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-edlopen| image:: https://github.com/edlopen.png?size=40px + :target: https://github.com/edlopen + :alt: edlopen +.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px + :target: https://github.com/rafaelbn + :alt: rafaelbn + +Current `maintainers `__: + +|maintainer-edlopen| |maintainer-rafaelbn| + +This module is part of the `OCA/partner-contact `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_category_description/__init__.py b/partner_category_description/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/partner_category_description/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/partner_category_description/__manifest__.py b/partner_category_description/__manifest__.py new file mode 100644 index 00000000000..8828ad4c17f --- /dev/null +++ b/partner_category_description/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2024 Moduon Team S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/LGPL-3.0) + +{ + "name": "Partner Category Description", + "summary": """Adds a description field to contact categories to improve + organization and managment of customer relationships.""", + "version": "17.0.1.0.0", + "development_status": "Alpha", + "category": "Marketing", + "website": "https://github.com/OCA/partner-contact", + "author": "Moduon, Odoo Community Association (OCA)", + "maintainers": ["edlopen", "rafaelbn"], + "license": "LGPL-3", + "application": False, + "installable": True, + "depends": [ + "contacts", + ], + "data": [ + "views/res_partner_category_views.xml", + ], +} diff --git a/partner_category_description/i18n/es.po b/partner_category_description/i18n/es.po new file mode 100644 index 00000000000..fdd7ceb7cc2 --- /dev/null +++ b/partner_category_description/i18n/es.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_category_description +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 14:17+0000\n" +"PO-Revision-Date: 2024-07-22 16:18+0200\n" +"Last-Translator: Eduardo López \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.4.4\n" + +#. module: partner_category_description +#: model:ir.model.fields,field_description:partner_category_description.field_res_partner_category__description +msgid "Description" +msgstr "Descripción" + +#. module: partner_category_description +#: model:ir.model,name:partner_category_description.model_res_partner_category +msgid "Partner Tags" +msgstr "Etiquetas del contacto" diff --git a/partner_category_description/i18n/it.po b/partner_category_description/i18n/it.po new file mode 100644 index 00000000000..f5bde11f0ce --- /dev/null +++ b/partner_category_description/i18n/it.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_category_description +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-07-30 11:58+0000\n" +"Last-Translator: mymage \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 5.6.2\n" + +#. module: partner_category_description +#: model:ir.model.fields,field_description:partner_category_description.field_res_partner_category__description +msgid "Description" +msgstr "Descrizione" + +#. module: partner_category_description +#: model:ir.model,name:partner_category_description.model_res_partner_category +msgid "Partner Tags" +msgstr "Etichette partner" diff --git a/partner_category_description/i18n/partner_category_description.pot b/partner_category_description/i18n/partner_category_description.pot new file mode 100644 index 00000000000..adbbeb104dd --- /dev/null +++ b/partner_category_description/i18n/partner_category_description.pot @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_category_description +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: partner_category_description +#: model:ir.model.fields,field_description:partner_category_description.field_res_partner_category__description +msgid "Description" +msgstr "" + +#. module: partner_category_description +#: model:ir.model,name:partner_category_description.model_res_partner_category +msgid "Partner Tags" +msgstr "" diff --git a/partner_category_description/models/__init__.py b/partner_category_description/models/__init__.py new file mode 100644 index 00000000000..da908a80fd6 --- /dev/null +++ b/partner_category_description/models/__init__.py @@ -0,0 +1 @@ +from . import res_partner_category diff --git a/partner_category_description/models/res_partner_category.py b/partner_category_description/models/res_partner_category.py new file mode 100644 index 00000000000..13d8773b060 --- /dev/null +++ b/partner_category_description/models/res_partner_category.py @@ -0,0 +1,10 @@ +# Copyright 2024 Moduon Team S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/LGPL-3.0) + +from odoo import fields, models + + +class ResPartnerCategory(models.Model): + _inherit = "res.partner.category" + + description = fields.Char(translate=True) diff --git a/partner_category_description/pyproject.toml b/partner_category_description/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/partner_category_description/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/partner_category_description/readme/CONTRIBUTORS.md b/partner_category_description/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..67e58db6a88 --- /dev/null +++ b/partner_category_description/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Eduardo López ([Moduon](https://www.moduon.team/)) +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/partner_category_description/readme/DESCRIPTION.md b/partner_category_description/readme/DESCRIPTION.md new file mode 100644 index 00000000000..a2180398fd4 --- /dev/null +++ b/partner_category_description/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module adds a description field to contact tags. diff --git a/partner_category_description/readme/USAGE.md b/partner_category_description/readme/USAGE.md new file mode 100644 index 00000000000..935cc434e08 --- /dev/null +++ b/partner_category_description/readme/USAGE.md @@ -0,0 +1,4 @@ +1. Create a Tag: Navigate to CRM > Tags and click on "Create" to add a new tag. + +2. Add a Description: Provide a detailed explanation of the tag's purpose and +criteria in the newly added "Description" field. diff --git a/partner_category_description/static/description/icon.png b/partner_category_description/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/partner_category_description/static/description/icon.png differ diff --git a/partner_category_description/static/description/index.html b/partner_category_description/static/description/index.html new file mode 100644 index 00000000000..0521dbd9431 --- /dev/null +++ b/partner_category_description/static/description/index.html @@ -0,0 +1,445 @@ + + + + + +Partner Category Description + + + +
+

Partner Category Description

+ + +

Alpha License: LGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runboat

+

This module adds a description field to contact tags.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Usage

+
    +
  1. Create a Tag: Navigate to CRM > Tags and click on “Create” to add a +new tag.
  2. +
  3. Add a Description: Provide a detailed explanation of the tag’s +purpose and criteria in the newly added “Description” field.
  4. +
+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Moduon
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

Current maintainers:

+

edlopen rafaelbn

+

This module is part of the OCA/partner-contact project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/partner_category_description/tests/__init__.py b/partner_category_description/tests/__init__.py new file mode 100644 index 00000000000..30a2e1ecde4 --- /dev/null +++ b/partner_category_description/tests/__init__.py @@ -0,0 +1 @@ +from . import test_partner_category_description diff --git a/partner_category_description/tests/test_partner_category_description.py b/partner_category_description/tests/test_partner_category_description.py new file mode 100644 index 00000000000..be3fb49285b --- /dev/null +++ b/partner_category_description/tests/test_partner_category_description.py @@ -0,0 +1,31 @@ +# Copyright 2024 Moduon Team S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/LGPL-3.0) + +from odoo.addons.base.tests.common import BaseCommon + + +class TestResPartnerCategory(BaseCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.partner_category = cls.env["res.partner.category"].create( + {"name": "Test Category", "description": "This is a test description"} + ) + + def test_category_creation(self): + """Test that a partner category is created correctly.""" + self.assertTrue(self.partner_category, "Partner category should be created.") + self.assertEqual(self.partner_category.name, "Test Category") + self.assertEqual( + self.partner_category.description, "This is a test description" + ) + + def test_description_field_translation(self): + """Test that the description field is translatable.""" + self.partner_category.with_context( + lang="fr_FR" + ).description = "Description en français" + self.assertEqual( + self.partner_category.with_context(lang="fr_FR").description, + "Description en français", + ) diff --git a/partner_category_description/views/res_partner_category_views.xml b/partner_category_description/views/res_partner_category_views.xml new file mode 100644 index 00000000000..5bda572f203 --- /dev/null +++ b/partner_category_description/views/res_partner_category_views.xml @@ -0,0 +1,37 @@ + + + + + res.partner.category + + + + + + + + + + res.partner.category + + + + + + + + + + + + res.partner.category + + + + + + + + +