Skip to content

Commit

Permalink
[MIG] crm_lead_firstname: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderDeMatteis committed Nov 9, 2022
1 parent 64daa37 commit 7a0b50e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crm_lead_firstname/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Firstname and Lastname in Leads",
"summary": "Specify split names for contacts in leads",
"version": "14.0.1.0.2",
"version": "15.0.1.0.0",
"category": "Customer Relationship Management",
"website": "https://github.com/OCA/crm",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
8 changes: 4 additions & 4 deletions crm_lead_firstname/tests/test_crm_lead.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo.tests.common import Form, SavepointCase
from odoo.tests.common import Form, TransactionCase


class FirstNameCase(SavepointCase):
class FirstNameCase(TransactionCase):
@classmethod
def setUpClass(cls):
super(FirstNameCase, cls).setUpClass()
Expand All @@ -25,15 +25,15 @@ def setUpClass(cls):

def test_create_contact(self):
"""Contact correctly created."""
self.lead.handle_partner_assignment()
self.lead._handle_partner_assignment()
partner = self.partner_model.browse(self.lead.partner_id.id)
self.assertEqual(self.lead.contact_name, partner.firstname)
self.assertEqual(self.lead.contact_lastname, partner.lastname)

def test_create_contact_empty(self):
"""No problems creating a contact without names."""
self.lead.write({"contact_name": False, "contact_lastname": False})
self.lead.handle_partner_assignment()
self.lead._handle_partner_assignment()

def test_onchange_partner(self):
"""When changing partner, fields get correctly updated."""
Expand Down
1 change: 1 addition & 0 deletions oca_dependencies.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
partner-contact
sale-reporting

0 comments on commit 7a0b50e

Please sign in to comment.