[IMP] crm_reveal: add install button in CRM settings + credit widget
This commit is contained in:
@@ -11,6 +11,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
generate_lead_from_alias = fields.Boolean('Manual Assignation of Emails', config_parameter='crm.generate_lead_from_alias')
|
||||
group_use_lead = fields.Boolean(string="Leads", implied_group='crm.group_use_lead')
|
||||
module_crm_phone_validation = fields.Boolean("Phone Formatting")
|
||||
module_crm_reveal = fields.Boolean("Create Leads/Opportunities from your website's traffic")
|
||||
|
||||
def _find_default_lead_alias_id(self):
|
||||
alias = self.env.ref('crm.mail_alias_lead_info', False)
|
||||
|
||||
@@ -53,6 +53,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_crm_reveal"/>
|
||||
</div>
|
||||
|
||||
<div class="o_setting_right_pane crm_reveal_settings">
|
||||
<label for="module_crm_reveal"/>
|
||||
<div class="text-muted">
|
||||
Use information about about your website's visitors to boost your sales. Charge your IAP account to use this service.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Contacts</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-lg-6 o_setting_box">
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
'security/ir.model.access.csv',
|
||||
'views/crm_lead_view.xml',
|
||||
'views/crm_reveal_views.xml',
|
||||
'views/res_config_settings_views.xml'
|
||||
'views/res_config_settings_views.xml',
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,4 +4,3 @@ from . import crm_lead
|
||||
from . import crm_reveal_rule
|
||||
from . import crm_reveal_view
|
||||
from . import ir
|
||||
from . import res_config_settings
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
@api.multi
|
||||
def action_buy_reveal_iap_credits(self):
|
||||
url = self.env['iap.account'].get_credits_url('reveal', 'https://iap.odoo.com/iap/1/credit', 0)
|
||||
return {
|
||||
'type': 'ir.actions.act_url',
|
||||
'url': url,
|
||||
'target': 'new',
|
||||
}
|
||||
@@ -1,23 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.crm.reveal</field>
|
||||
<field name="name">res.config.settings.view.form.inherit.crm_reveal</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="5"/>
|
||||
<field name="inherit_id" ref="crm.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="crm_lead" position="after">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="crm_reveal">
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="IAP Lead Generations" for="action_buy_reveal_iap_credits"/>
|
||||
<div class="text-muted">
|
||||
Charge your IAP account to generate Leads/Opportunities from your website's traffic
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<button name="action_buy_reveal_iap_credits" string="Buy IAP Credits" type="object" class="oe_link" icon="fa-arrow-right"/>
|
||||
</div>
|
||||
</div>
|
||||
<xpath expr="//div[hasclass('crm_reveal_settings')]" position="inside">
|
||||
<div class="content-group">
|
||||
<widget name="iap_credit_checker" service_name="crm_reveal"/>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user