diff --git a/crm_lead_lost_reason/README.rst b/crm_lead_lost_reason/README.rst new file mode 100644 index 00000000000..8098cd9f6f9 --- /dev/null +++ b/crm_lead_lost_reason/README.rst @@ -0,0 +1,67 @@ +================= +CRM - Lost Reason +================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:a23a2ca6255bf767f7ddf11d5bfa8f126304fb8e205cea3aafca992c5b7f370a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-camptocamp%2Fcrm-lightgray.png?logo=github + :target: https://github.com/camptocamp/crm/tree/15.0-ADD-crm_lead_lost_reason/crm_lead_lost_reason + :alt: camptocamp/crm + +|badge1| |badge2| |badge3| + +Always ask for lost reason when setting a lead/opportunity as "lost". + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you just need to install it. + +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 +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* `Camptocamp `_: + + * Silvio Gregorini + +Maintainers +~~~~~~~~~~~ + +This module is part of the `camptocamp/crm `_ project on GitHub. + +You are welcome to contribute. diff --git a/crm_lead_lost_reason/__init__.py b/crm_lead_lost_reason/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/crm_lead_lost_reason/__manifest__.py b/crm_lead_lost_reason/__manifest__.py new file mode 100644 index 00000000000..80ced1de173 --- /dev/null +++ b/crm_lead_lost_reason/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2023 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "CRM - Lost Reason", + "summary": "Always add lost reasons to leads/opportunities", + "version": "15.0.1.0.0", + "category": "Customer Relationship Management", + "website": "https://github.com/OCA/crm", + "author": "Camptocamp, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["crm"], + "data": [ + "data/ir_actions_server.xml", + "views/crm_lead.xml", + ], +} diff --git a/crm_lead_lost_reason/data/ir_actions_server.xml b/crm_lead_lost_reason/data/ir_actions_server.xml new file mode 100644 index 00000000000..1ba9e79a053 --- /dev/null +++ b/crm_lead_lost_reason/data/ir_actions_server.xml @@ -0,0 +1,11 @@ + + + + +if records: + action_values = env.ref('crm.crm_lead_lost_action').sudo().read()[0] + action_values.update({'context': env.context}) + action = action_values + + + diff --git a/crm_lead_lost_reason/readme/CONTRIBUTORS.rst b/crm_lead_lost_reason/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..88b50530843 --- /dev/null +++ b/crm_lead_lost_reason/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `Camptocamp `_: + + * Silvio Gregorini diff --git a/crm_lead_lost_reason/readme/DESCRIPTION.rst b/crm_lead_lost_reason/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..51571a93b00 --- /dev/null +++ b/crm_lead_lost_reason/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Always ask for lost reason when setting a lead/opportunity as "lost". diff --git a/crm_lead_lost_reason/readme/USAGE.rst b/crm_lead_lost_reason/readme/USAGE.rst new file mode 100644 index 00000000000..1df76df5bcb --- /dev/null +++ b/crm_lead_lost_reason/readme/USAGE.rst @@ -0,0 +1 @@ +To use this module, you just need to install it. diff --git a/crm_lead_lost_reason/static/description/index.html b/crm_lead_lost_reason/static/description/index.html new file mode 100644 index 00000000000..4e84a50deec --- /dev/null +++ b/crm_lead_lost_reason/static/description/index.html @@ -0,0 +1,424 @@ + + + + + + +CRM - Lost Reason + + + +
+

CRM - Lost Reason

+ + +

Beta License: AGPL-3 camptocamp/crm

+

Always ask for lost reason when setting a lead/opportunity as “lost”.

+

Table of contents

+ +
+

Usage

+

To use this module, you just need to install it.

+
+
+

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

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is part of the camptocamp/crm project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/crm_lead_lost_reason/views/crm_lead.xml b/crm_lead_lost_reason/views/crm_lead.xml new file mode 100644 index 00000000000..2f7b4428ae8 --- /dev/null +++ b/crm_lead_lost_reason/views/crm_lead.xml @@ -0,0 +1,20 @@ + + + + crm.lead + + + + + {'invisible': [('active', '=', False), ('probability', '<', 100)]} + + + + 1 + + + + diff --git a/setup/crm_lead_lost_reason/odoo/addons/crm_lead_lost_reason b/setup/crm_lead_lost_reason/odoo/addons/crm_lead_lost_reason new file mode 120000 index 00000000000..7929dc96d28 --- /dev/null +++ b/setup/crm_lead_lost_reason/odoo/addons/crm_lead_lost_reason @@ -0,0 +1 @@ +../../../../crm_lead_lost_reason \ No newline at end of file diff --git a/setup/crm_lead_lost_reason/setup.py b/setup/crm_lead_lost_reason/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/crm_lead_lost_reason/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)