[ADD] iap_crm: bridge module for IAP and CRM

PURPOSE

Clean and improve IAP services integration in Odoo. Clean IAP integrations
tools and improve data sharing with base modules, notably for CRM and Partner.

SPECIFICATIONS

In this commit we create a bridge module between iap_mail and crm to hold
notably some fields used in various CRM integrations.

Now that we have clean bridge module we can safely update crm and partner
integrations dependencies.

LINKS

Task ID-2248367
Community PR odoo/odoo#53214
Enterprise PR odoo/enterprise#11258
Upgrade PR odoo/upgrade#1363
IAP PR odoo/iap-apps#191
This commit is contained in:
Thibault Delavallée
2020-08-18 11:41:59 +00:00
parent 323890f7ea
commit 8280c7d559
15 changed files with 48 additions and 48 deletions
+3 -2
View File
@@ -3,12 +3,13 @@
{
'name': 'Lead Generation',
'summary': 'Create Leads/Opportunities based on country, industries, size, etc.',
'summary': 'Generate Leads/Opportunities based on country, industries, size, etc.',
'version': '1.1',
'category': 'Sales/CRM',
'version': '1.1',
'depends': [
'iap_crm',
'iap_mail',
'crm',
],
'data': [
'data/crm.iap.lead.industry.csv',
-1
View File
@@ -4,4 +4,3 @@ from . import crm_lead
from . import crm_iap_lead
from . import crm_iap_lead_helpers
from . import crm_iap_lead_mining_request
from . import ir_model_fields
-1
View File
@@ -7,5 +7,4 @@ from odoo import fields, models
class Lead(models.Model):
_inherit = 'crm.lead'
reveal_id = fields.Char(string='Reveal ID', index=True)
lead_mining_request_id = fields.Many2one('crm.iap.lead.mining.request', string='Lead Mining Request', index=True)
@@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details
from odoo import models
class IrModelFields(models.Model):
_inherit = 'ir.model.fields'
def unlink(self):
# Nasty hack to prevent the deletion of shared field reveal_id
self = self.filtered(
lambda rec: not (
rec.model == 'crm.lead'
and rec.name == 'reveal_id'
)
)
return super(IrModelFields, self).unlink()
+2 -1
View File
@@ -4,11 +4,12 @@
{
'name': 'Lead Enrichment',
'summary': 'Enrich Leads/Opportunities using email address domain',
'version': '1.1',
'category': 'Sales/CRM',
'version': '1.1',
'depends': [
'iap_crm',
'iap_mail',
'crm',
],
'data': [
'data/ir_cron.xml',
@@ -4,4 +4,3 @@
from . import crm_lead
from . import iap_enrich_api
from . import res_config_settings
from . import ir_model_fields
@@ -13,7 +13,6 @@ _logger = logging.getLogger(__name__)
class Lead(models.Model):
_inherit = 'crm.lead'
reveal_id = fields.Char(string='Reveal ID', index=True)
iap_enrich_done = fields.Boolean(string='Enrichment done', help='Whether IAP service for lead enrichment based on email has been performed on this lead.')
show_enrich_button = fields.Boolean(string='Allow manual enrich', compute="_compute_show_enrich_button")
@@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details
from odoo import models
class IrModelFields(models.Model):
_inherit = 'ir.model.fields'
def unlink(self):
# Nasty hack to prevent the deletion of shared field reveal_id
self = self.filtered(
lambda rec: not (
rec.model == 'crm.lead'
and rec.name == 'reveal_id'
)
)
return super(IrModelFields, self).unlink()
+3 -3
View File
@@ -3,14 +3,14 @@
{
'name': 'Lead Generation From Website Visits',
'summary': 'Create Leads/Opportunities from your website\'s traffic',
'summary': 'Generate Leads/Opportunities from your website\'s traffic',
'version': '1.1',
'category': 'Sales/CRM',
'depends': [
'iap_crm',
'iap_mail',
'crm',
'crm_iap_lead',
'website_form',
'website_form'
],
'data': [
'data/reveal_data.xml',
+4
View File
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
+20
View File
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "IAP / CRM",
'summary': """Bridge between IAP and CRM""",
'description': """Bridge between IAP and CRM""",
'category': 'Hidden/Tools',
'version': '1.0',
'depends': [
'crm',
'iap_mail',
],
'application': False,
'installable': True,
'auto_install': True,
'data': [
],
}
+4
View File
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import crm_lead
+10
View File
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class Lead(models.Model):
_inherit = 'crm.lead'
reveal_id = fields.Char(string='Reveal ID', help="Technical ID of reveal request done by IAP.")
+1 -1
View File
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Partner Autocomplete",
'summary': "Auto-complete partner companies' data",
@@ -11,7 +12,6 @@
'author': "Odoo SA",
'category': 'Hidden/Tools',
'version': '1.0',
'depends': [
'iap_mail',
],
+1 -1
View File
@@ -4,7 +4,7 @@
{
'name': 'Base',
'version': '1.4',
'version': '1.3',
'category': 'Hidden',
'description': """
The kernel of Odoo, needed for all installation.