diff --git a/partner_title_for_company/__init__.py b/partner_title_for_company/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/partner_title_for_company/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/partner_title_for_company/__manifest__.py b/partner_title_for_company/__manifest__.py new file mode 100644 index 00000000000..edf1796da36 --- /dev/null +++ b/partner_title_for_company/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2024 INVITU () + +{ + "name": "Partner title for companies", + "summary": "Add titles for companies", + "version": "17.0.1.1.0", + "author": "INVITU, " "Odoo Community Association (OCA)", + "license": "AGPL-3", + "maintainer": "INVITU", + "category": "Extra Tools", + "website": "https://github.com/OCA/partner-contact", + "depends": ["base"], + "post_init_hook": "", + "data": [ + "views/res_partner_views.xml", + ], + "auto_install": False, + "installable": True, +} diff --git a/partner_title_for_company/models/__init__.py b/partner_title_for_company/models/__init__.py new file mode 100644 index 00000000000..91fed54d404 --- /dev/null +++ b/partner_title_for_company/models/__init__.py @@ -0,0 +1 @@ +from . import res_partner diff --git a/partner_title_for_company/models/res_partner.py b/partner_title_for_company/models/res_partner.py new file mode 100644 index 00000000000..c7f5ac9f877 --- /dev/null +++ b/partner_title_for_company/models/res_partner.py @@ -0,0 +1,9 @@ +from odoo import fields, models + + +class PartnerTitle(models.Model): + _inherit = "res.partner.title" + + for_company = fields.Boolean( + string="For companies", help="Check if the title is meant for companies" + ) diff --git a/partner_title_for_company/pyproject.toml b/partner_title_for_company/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/partner_title_for_company/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/partner_title_for_company/readme/CONTRIBUTORS.md b/partner_title_for_company/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..ef68bcc2c34 --- /dev/null +++ b/partner_title_for_company/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Cyril VINH-TUNG \\> diff --git a/partner_title_for_company/readme/DESCRIPTION.md b/partner_title_for_company/readme/DESCRIPTION.md new file mode 100644 index 00000000000..f52e5001042 --- /dev/null +++ b/partner_title_for_company/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module was written to extend the functionality of titles to +companies. diff --git a/partner_title_for_company/readme/USAGE.md b/partner_title_for_company/readme/USAGE.md new file mode 100644 index 00000000000..d16197d66b1 --- /dev/null +++ b/partner_title_for_company/readme/USAGE.md @@ -0,0 +1 @@ +The field *for_company* in Partner Titles allows to add titles for companies diff --git a/partner_title_for_company/static/description/icon.png b/partner_title_for_company/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/partner_title_for_company/static/description/icon.png differ diff --git a/partner_title_for_company/views/res_partner_views.xml b/partner_title_for_company/views/res_partner_views.xml new file mode 100644 index 00000000000..612627973dd --- /dev/null +++ b/partner_title_for_company/views/res_partner_views.xml @@ -0,0 +1,38 @@ + + + view.partner.title.for.company.tree + res.partner.title + + + + + + + + + + view.partner.title.for.company.form + res.partner.title + + + + + + + + + + view.partner.for.company.form + res.partner + + + + + + + [('for_company', '=', is_company)] + + + + +