Skip to content

Commit a8e0b61

Browse files
committedFeb 24, 2020
[MIG] crm_lead_firstname: Migration to 13.0
1 parent 876c503 commit a8e0b61

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed
 

‎crm_lead_firstname/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Firstname and Lastname in Leads",
55
"summary": "Specify split names for contacts in leads",
6-
"version": "12.0.1.0.0",
6+
"version": "13.0.1.0.0",
77
"category": "Customer Relationship Management",
88
"website": "http://www.github.com/OCA/crm",
99
"author": "Tecnativa, Odoo Community Association (OCA)",

‎crm_lead_firstname/models/crm_lead.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# © 2016 Antiun Ingeniería S.L. - Jairo Llopis
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
33

4-
from odoo import api, fields, models
4+
from odoo import fields, models
55

66

77
class CrmLead(models.Model):
@@ -10,7 +10,6 @@ class CrmLead(models.Model):
1010
contact_name = fields.Char("First name")
1111
contact_lastname = fields.Char("Last name")
1212

13-
@api.multi
1413
def _create_lead_partner_data(self, name, is_company, parent_id=False):
1514
"""Ensure first and last names of contact match those in lead."""
1615
lead_partner_data = super(CrmLead, self)._create_lead_partner_data(

‎crm_lead_firstname/views/crm_lead_view.xml

+2-18
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
44

55
<odoo>
6-
<record id="crm_case_form_view_leads" model="ir.ui.view">
6+
<record id="crm_lead_view_form" model="ir.ui.view">
77
<field name="name">Add firstname and lastname</field>
88
<field name="model">crm.lead</field>
9-
<field name="inherit_id" ref="crm.crm_case_form_view_leads"/>
9+
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
1010
<field name="arch" type="xml">
1111
<xpath expr="//label[@for='contact_name']" position="attributes">
1212
<attribute name="string">Contact Name</attribute>
@@ -20,20 +20,4 @@
2020
</field>
2121
</record>
2222

23-
<record id="crm_case_form_view_oppor" model="ir.ui.view">
24-
<field name="name">Add firstname and lastname</field>
25-
<field name="model">crm.lead</field>
26-
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
27-
<field name="arch" type="xml">
28-
<xpath expr="//label[@for='contact_name']" position="attributes">
29-
<attribute name="string">Contact Name</attribute>
30-
</xpath>
31-
<xpath expr="//field[@name='contact_name']" position="attributes">
32-
<attribute name="placeholder">Firstname</attribute>
33-
</xpath>
34-
<xpath expr="//field[@name='contact_name']" position="after">
35-
<field name="contact_lastname" placeholder="Lastname"/>
36-
</xpath>
37-
</field>
38-
</record>
3923
</odoo>

0 commit comments

Comments
 (0)