Skip to content

Commit dedbf98

Browse files
[MIG] crm_lead_to_opportunity_contact: Migration to 19.0
1 parent fda2177 commit dedbf98

15 files changed

Lines changed: 95 additions & 76 deletions

File tree

crm_lead_to_opportunity_contact/README.rst

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
15
=================================
26
CRM Lead to opportunity - Contact
37
=================================
@@ -13,31 +17,33 @@ CRM Lead to opportunity - Contact
1317
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1418
:target: https://odoo-community.org/page/development-status
1519
:alt: Beta
16-
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
1721
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822
:alt: License: AGPL-3
1923
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github
20-
:target: https://github.com/OCA/crm/tree/16.0/crm_lead_to_opportunity_contact
24+
:target: https://github.com/OCA/crm/tree/19.0/crm_lead_to_opportunity_contact
2125
:alt: OCA/crm
2226
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/crm-16-0/crm-16-0-crm_lead_to_opportunity_contact
27+
:target: https://translation.odoo-community.org/projects/crm-19-0/crm-19-0-crm_lead_to_opportunity_contact
2428
:alt: Translate me on Weblate
2529
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=16.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=19.0
2731
:alt: Try me on Runboat
2832

2933
|badge1| |badge2| |badge3| |badge4| |badge5|
3034

3135
In the wizard to convert a lead to an opportunity, you have 3 options:
3236

33-
* Create a new customer
34-
* Link to an existing customer
35-
* Do not link to a customer
37+
- Create a new customer
38+
- Link to an existing customer
39+
- Do not link to a customer
40+
41+
This modules adds a fourth option: **Create a new contact on an existing
42+
customer**.
3643

37-
This modules adds a fourth option: **Create a new contact on an existing customer**.
44+
|Screenshot lead to opportunity wizard|
3845

39-
.. figure:: https://raw.githubusercontent.com/OCA/crm/16.0/crm_lead_to_opportunity_contact/static/description/crm_lead_to_opportunity_contact-sshot.png
40-
:alt: Screenshot lead to opportunity wizard
46+
.. |Screenshot lead to opportunity wizard| image:: https://raw.githubusercontent.com/OCA/crm/19.0/crm_lead_to_opportunity_contact/static/description/crm_lead_to_opportunity_contact-sshot.png
4147

4248
**Table of contents**
4349

@@ -50,25 +56,26 @@ Bug Tracker
5056
Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/issues>`_.
5157
In case of trouble, please check there if your issue has already been reported.
5258
If you spotted it first, help us to smash it by providing a detailed and welcomed
53-
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_lead_to_opportunity_contact%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
59+
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_lead_to_opportunity_contact%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5460

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

5763
Credits
5864
=======
5965

6066
Authors
61-
~~~~~~~
67+
-------
6268

6369
* Akretion
6470

6571
Contributors
66-
~~~~~~~~~~~~
72+
------------
6773

68-
* Alexis de Lattre <alexis.delattre@akretion.com>
74+
- Alexis de Lattre <alexis.delattre@akretion.com>
75+
- Marc Gimeno Morales <marc.gimeno@forgeflow.com>
6976

7077
Maintainers
71-
~~~~~~~~~~~
78+
-----------
7279

7380
This module is maintained by the OCA.
7481

@@ -88,6 +95,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
8895

8996
|maintainer-alexis-via|
9097

91-
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/16.0/crm_lead_to_opportunity_contact>`_ project on GitHub.
98+
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/19.0/crm_lead_to_opportunity_contact>`_ project on GitHub.
9299

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

crm_lead_to_opportunity_contact/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "CRM Lead to opportunity - Contact",
7-
"version": "16.0.1.0.0",
7+
"version": "19.0.1.0.0",
88
"category": "CRM",
99
"license": "AGPL-3",
1010
"summary": "Lead to opportunity: option to create a contact on an existing "

crm_lead_to_opportunity_contact/models/crm_lead.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
33
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
44

5-
from odoo import _, models
5+
from odoo import models
66
from odoo.exceptions import UserError
7+
from odoo.tools import parse_contact_from_email
78

89

910
class CrmLead(models.Model):
@@ -15,10 +16,10 @@ def _create_child_partner(self, parent_partner_id):
1516
rpo = self.env["res.partner"]
1617
contact_name = self.contact_name
1718
if not contact_name and self.email_from:
18-
contact_name = rpo._parse_partner_name(self.email_from)[0]
19+
contact_name = parse_contact_from_email(self.email_from)[0]
1920
if not contact_name:
2021
raise UserError(
21-
_("Contact name is not set on lead '%s'.") % self.display_name
22+
self.env._("Contact name is not set on lead %s.", self.display_name)
2223
)
2324
vals = self.with_context(
2425
default_user_id=self.user_id.id
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Alexis de Lattre \<alexis.delattre@akretion.com\>
2+
- Marc Gimeno Morales \<marc.gimeno@forgeflow.com\>

crm_lead_to_opportunity_contact/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
In the wizard to convert a lead to an opportunity, you have 3 options:
2+
3+
- Create a new customer
4+
- Link to an existing customer
5+
- Do not link to a customer
6+
7+
This modules adds a fourth option: **Create a new contact on an existing
8+
customer**.
9+
10+
![Screenshot lead to opportunity
11+
wizard](../static/description/crm_lead_to_opportunity_contact-sshot.png)

crm_lead_to_opportunity_contact/readme/DESCRIPTION.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.
-9.98 KB
Loading
9.23 KB
Loading

0 commit comments

Comments
 (0)