diff --git a/partner_priority/README.rst b/partner_priority/README.rst new file mode 100644 index 000000000000..8f4c178a43a5 --- /dev/null +++ b/partner_priority/README.rst @@ -0,0 +1,90 @@ +================ +Partner Priority +================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/13.0/partner_priority + :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-13-0/partner-contact-13-0-partner_priority + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/134/13.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds priority on partners. Priorities can be used to rank partners or as a way to mark the sensitivity level of a customer. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Configure via CONTACT -> CONFIGURATION -> PRIORITIES. +#. Set the priority level on the partner form. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Patrick Wilson + +Contributors +~~~~~~~~~~~~ + +* Patrick Wilson +* Tharathip Chaweewongphan + +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-patrickrwilson| image:: https://github.com/patrickrwilson.png?size=40px + :target: https://github.com/patrickrwilson + :alt: patrickrwilson + +Current `maintainer `__: + +|maintainer-patrickrwilson| + +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_priority/__init__.py b/partner_priority/__init__.py new file mode 100644 index 000000000000..31660d6a9650 --- /dev/null +++ b/partner_priority/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/partner_priority/__manifest__.py b/partner_priority/__manifest__.py new file mode 100644 index 000000000000..41c8c6bd8b89 --- /dev/null +++ b/partner_priority/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2019 Patrick Wilson +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Partner Priority", + "summary": "Adds priority to partners.", + "author": "Patrick Wilson, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/partner-contact", + "category": "Customer Relationship Management", + "version": "13.0.1.0.0", + "license": "AGPL-3", + "depends": ["contacts"], + "data": [ + "views/res_partner.xml", + "views/partner_priority.xml", + "security/ir.model.access.csv", + "data/partner_priority_data.xml", + "data/partner_priority_sequence_data.xml", + ], + "development_status": "Beta", + "maintainers": ["patrickrwilson"], +} diff --git a/partner_priority/data/partner_priority_data.xml b/partner_priority/data/partner_priority_data.xml new file mode 100644 index 000000000000..43e9f6c7b104 --- /dev/null +++ b/partner_priority/data/partner_priority_data.xml @@ -0,0 +1,24 @@ + + + + Low + Low Priority + 1 + + + Normal + Normal Priority + 3 + + + Elevated + Elevated Priority + 5 + + + Critical + Critical Priority + 8 + + diff --git a/partner_priority/data/partner_priority_sequence_data.xml b/partner_priority/data/partner_priority_sequence_data.xml new file mode 100644 index 000000000000..a173cea5160d --- /dev/null +++ b/partner_priority/data/partner_priority_sequence_data.xml @@ -0,0 +1,10 @@ + + + + Priority Sequence + partner.priority + 0 + 1 + + diff --git a/partner_priority/i18n/partner_priority.pot b/partner_priority/i18n/partner_priority.pot new file mode 100644 index 000000000000..fe5373711be5 --- /dev/null +++ b/partner_priority/i18n/partner_priority.pot @@ -0,0 +1,95 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_priority +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.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_priority +#: model:ir.model,name:partner_priority.model_res_partner +msgid "Contact" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__create_uid +msgid "Created by" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__create_date +msgid "Created on" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__description +msgid "Description" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__display_name +msgid "Display Name" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__id +msgid "ID" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority____last_update +msgid "Last Modified on" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__write_date +msgid "Last Updated on" +msgstr "" + +#. module: partner_priority +#: model_terms:ir.ui.view,arch_db:partner_priority.partner_priority_view_form +msgid "Name" +msgstr "" + +#. module: partner_priority +#: model:ir.model,name:partner_priority.model_partner_priority +msgid "Partner Priority" +msgstr "" + +#. module: partner_priority +#: model:ir.ui.menu,name:partner_priority.res_partner_priority_menu +msgid "Priorities" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__name +#: model:ir.model.fields,field_description:partner_priority.field_res_partner__priority_id +#: model:ir.model.fields,field_description:partner_priority.field_res_users__priority_id +#: model_terms:ir.ui.view,arch_db:partner_priority.partner_priority_view_form +#: model_terms:ir.ui.view,arch_db:partner_priority.partner_priority_view_list +#: model_terms:ir.ui.view,arch_db:partner_priority.view_res_partner_filter +msgid "Priority" +msgstr "" + +#. module: partner_priority +#: model:ir.actions.act_window,name:partner_priority.partner_priority_action +msgid "Priority Action" +msgstr "" + +#. module: partner_priority +#: model:ir.model.fields,field_description:partner_priority.field_partner_priority__sequence +msgid "Sequence" +msgstr "" + diff --git a/partner_priority/models/__init__.py b/partner_priority/models/__init__.py new file mode 100644 index 000000000000..7aa45359ca50 --- /dev/null +++ b/partner_priority/models/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import partner_priority +from . import res_partner diff --git a/partner_priority/models/partner_priority.py b/partner_priority/models/partner_priority.py new file mode 100644 index 000000000000..a742a6c16ac0 --- /dev/null +++ b/partner_priority/models/partner_priority.py @@ -0,0 +1,20 @@ +# Copyright 2019 Patrick Wilson +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class PartnerPriority(models.Model): + _name = "partner.priority" + _order = "sequence" + _description = "Partner Priority" + + name = fields.Char(string="Priority", required=True) + description = fields.Text(required=True) + sequence = fields.Integer( + required=True, + default=lambda self: self.env["ir.sequence"].next_by_code( + "res.partner.priority" + ) + or 0, + ) diff --git a/partner_priority/models/res_partner.py b/partner_priority/models/res_partner.py new file mode 100644 index 000000000000..e7962a24b316 --- /dev/null +++ b/partner_priority/models/res_partner.py @@ -0,0 +1,10 @@ +# Copyright 2019 Patrick Wilson +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + priority_id = fields.Many2one("partner.priority") diff --git a/partner_priority/readme/CONTRIBUTORS.rst b/partner_priority/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..1f146cc242cb --- /dev/null +++ b/partner_priority/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Patrick Wilson +* Tharathip Chaweewongphan diff --git a/partner_priority/readme/DESCRIPTION.rst b/partner_priority/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..21774046b5fc --- /dev/null +++ b/partner_priority/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds priority on partners. Priorities can be used to rank partners or as a way to mark the sensitivity level of a customer. diff --git a/partner_priority/readme/USAGE.rst b/partner_priority/readme/USAGE.rst new file mode 100644 index 000000000000..beb3d9d8a256 --- /dev/null +++ b/partner_priority/readme/USAGE.rst @@ -0,0 +1,4 @@ +To use this module, you need to: + +#. Configure via CONTACT -> CONFIGURATION -> PRIORITIES. +#. Set the priority level on the partner form. diff --git a/partner_priority/security/ir.model.access.csv b/partner_priority/security/ir.model.access.csv new file mode 100644 index 000000000000..5bfff61ac2c5 --- /dev/null +++ b/partner_priority/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_partner_priority_user,partner.priority.user,model_partner_priority,base.group_user,1,0,0,0, +access_partner_priority_manager,partner.priority.manager,model_partner_priority,base.group_partner_manager,1,1,1,1, diff --git a/partner_priority/static/description/icon.png b/partner_priority/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/partner_priority/static/description/icon.png differ diff --git a/partner_priority/static/description/index.html b/partner_priority/static/description/index.html new file mode 100644 index 000000000000..4984945d714b --- /dev/null +++ b/partner_priority/static/description/index.html @@ -0,0 +1,431 @@ + + + + + + +Partner Priority + + + +
+

Partner Priority

+ + +

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

+

This module adds priority on partners. Priorities can be used to rank partners or as a way to mark the sensitivity level of a customer.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Configure via CONTACT -> CONFIGURATION -> PRIORITIES.
  2. +
  3. Set the priority level on the partner form.
  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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Patrick Wilson
  • +
+
+
+

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 maintainer:

+

patrickrwilson

+

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_priority/views/partner_priority.xml b/partner_priority/views/partner_priority.xml new file mode 100644 index 000000000000..e3f77ef42f06 --- /dev/null +++ b/partner_priority/views/partner_priority.xml @@ -0,0 +1,46 @@ + + + + Priority List + partner.priority + + + + + + + + + + Priority Form + partner.priority + +
+ +
+
+ + + +
+
+
+
+ + Priority Action + partner.priority + tree,form + + +
diff --git a/partner_priority/views/res_partner.xml b/partner_priority/views/res_partner.xml new file mode 100644 index 000000000000..f64797f323d3 --- /dev/null +++ b/partner_priority/views/res_partner.xml @@ -0,0 +1,31 @@ + + + + partner.priority.form + res.partner + + + + + + + + + partner.priority.filter + res.partner + + + + + + + +