[FIX] website, mass_mailing: fix social network

- Remove useless onchange company id from website, now that we configure it
in the res config.
- Add the onchange company into the res_config_settings
- Remove left duplicate data from mass_mailing
- Add ALL social links into the res config
This commit is contained in:
Jeremy Kersten
2018-08-31 16:37:45 +02:00
parent 288bcccc8e
commit ba2116838e
4 changed files with 287 additions and 281 deletions
@@ -98,13 +98,5 @@
<field name="sent" eval="(DateTime.today() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
<field name="bounced" eval="(DateTime.today() - relativedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S')"/>
</record>
<record id="base.main_company" model="res.company">
<field name="social_twitter">https://twitter.com/Odoo</field>
<field name="social_facebook">https://www.facebook.com/Odoo</field>
<field name="social_googleplus">https://plus.google.com/+Odooapps</field>
<field name="social_linkedin">https://www.linkedin.com/company/odoo</field>
</record>
</data>
</odoo>
+17 -12
View File
@@ -42,6 +42,21 @@ class ResConfigSettings(models.TransientModel):
module_website_links = fields.Boolean("Link Trackers")
auth_signup_uninvited = fields.Selection("Customer Account", related='website_id.auth_signup_uninvited')
social_twitter = fields.Char(related='website_id.social_twitter')
social_facebook = fields.Char(related='website_id.social_facebook')
social_github = fields.Char(related='website_id.social_github')
social_linkedin = fields.Char(related='website_id.social_linkedin')
social_youtube = fields.Char(related='website_id.social_youtube')
social_googleplus = fields.Char(related='website_id.social_googleplus')
social_instagram = fields.Char(related='website_id.social_instagram')
@api.depends('website_id')
def has_social_network(self):
self.has_social_network = self.social_twitter or self.social_facebook or self.social_github \
or self.social_linkedin or self.social_youtube or self.social_googleplus or self.social_instagram
has_social_network = fields.Boolean("Configure Social Network", compute=has_social_network, inverse=lambda x: x)
favicon = fields.Binary('Favicon', related='website_id.favicon')
google_maps_api_key = fields.Char(related='website_id.google_maps_api_key')
@@ -65,8 +80,8 @@ class ResConfigSettings(models.TransientModel):
self.google_analytics_key = False
def inverse_has_google_maps(self):
if not self.inverse_has_google_maps:
self._has_google_maps = False
if not self.has_google_maps:
self.google_maps_api_key = False
def inverse_has_google_analytics_dashboard(self):
if not self.has_google_analytics_dashboard:
@@ -109,16 +124,6 @@ class ResConfigSettings(models.TransientModel):
'target': 'self',
}
def company_go_to(self):
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'res.company',
'type': 'ir.actions.act_window',
'target': 'current',
'res_id': self.website_id.company_id.id,
}
def action_website_create_new(self):
return {
'view_type': 'form',
+11 -31
View File
@@ -49,8 +49,15 @@ class Website(models.Model):
def_lang = self.env['res.lang'].search([('code', '=', lang_code)], limit=1)
return def_lang.id if def_lang else self._active_languages()[0]
def _default_social_twitter(self):
return self.env.ref('base.main_company').social_twitter
name = fields.Char('Website Name', required=True)
domain = fields.Char('Website Domain')
country_group_ids = fields.Many2many('res.country.group', 'website_country_group_rel', 'website_id', 'country_group_id',
string='Country Groups', help='Used when multiple websites have the same domain.')
company_id = fields.Many2one('res.company', string="Company", default=lambda self: self.env.ref('base.main_company').id, required=True)
language_ids = fields.Many2many('res.lang', 'website_lang_rel', 'website_id', 'lang_id', 'Languages', default=_active_languages)
default_lang_id = fields.Many2one('res.lang', string="Default Language", default=_default_language, required=True)
default_lang_code = fields.Char("Default language code", related='default_lang_id.code', store=True)
auto_redirect_lang = fields.Boolean('Autoredirect Language', default=True, help="Should users be redirected to their browser's language")
def _default_social_facebook(self):
return self.env.ref('base.main_company').social_facebook
@@ -70,15 +77,8 @@ class Website(models.Model):
def _default_social_instagram(self):
return self.env.ref('base.main_company').social_instagram
name = fields.Char('Website Name', required=True)
domain = fields.Char('Website Domain')
country_group_ids = fields.Many2many('res.country.group', 'website_country_group_rel', 'website_id', 'country_group_id',
string='Country Groups', help='Used when multiple websites have the same domain.')
company_id = fields.Many2one('res.company', string="Company", default=lambda self: self.env.ref('base.main_company').id, required=True)
language_ids = fields.Many2many('res.lang', 'website_lang_rel', 'website_id', 'lang_id', 'Languages', default=_active_languages)
default_lang_id = fields.Many2one('res.lang', string="Default Language", default=_default_language, required=True)
default_lang_code = fields.Char("Default language code", related='default_lang_id.code', store=True)
auto_redirect_lang = fields.Boolean('Autoredirect Language', default=True, help="Should users be redirected to their browser's language")
def _default_social_twitter(self):
return self.env.ref('base.main_company').social_twitter
social_twitter = fields.Char('Twitter Account', default=_default_social_twitter)
social_facebook = fields.Char('Facebook Account', default=_default_social_facebook)
@@ -139,16 +139,6 @@ class Website(models.Model):
self.env['ir.qweb'].clear_caches()
return result
@api.onchange('company_id')
def _onchange_company_id(self):
self.social_twitter = self.company_id.social_twitter
self.social_facebook = self.company_id.social_facebook
self.social_github = self.company_id.social_github
self.social_linkedin = self.company_id.social_linkedin
self.social_youtube = self.company_id.social_youtube
self.social_googleplus = self.company_id.social_googleplus
self.social_instagram = self.company_id.social_instagram
# ----------------------------------------------------------
# Page Management
# ----------------------------------------------------------
@@ -391,16 +381,6 @@ class Website(models.Model):
return dependencies
# removed by 3c9e6c89e7207636c1bdab4ed8118c0c1089d43e
# @api.model
# def page_exists(self, name, module='website'):
# try:
# name = (name or "").replace("/website.", "").replace("/", "")
# if not name:
# return False
# return self.env.ref('%s.%s' % module, name)
# except Exception:
# return False
# ----------------------------------------------------------
# Languages
+259 -230
View File
@@ -8,270 +8,299 @@
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Website" string="Website" data-key="website" groups="website.group_website_designer">
<h2 groups="website.group_multi_website">Select the Website to Configure</h2>
<div class="row mt16 o_settings_container" id="website_selection_settings" groups="website.group_multi_website">
<div class="col-xs-12 col-md-6 o_setting_box" id="website">
<div class="o_setting_right_pane">
<label string="Website" for="website_id"/>
<div class="text-muted">
Settings on this page will apply to this website
<h2 groups="website.group_multi_website">Select the Website to Configure</h2>
<div class="row mt16 o_settings_container" id="website_selection_settings" groups="website.group_multi_website">
<div class="col-xs-12 col-md-6 o_setting_box" id="website">
<div class="o_setting_right_pane">
<label string="Website" for="website_id"/>
<div class="text-muted">
Settings on this page will apply to this website
</div>
<div class="mt16">
<field name="website_id" widget="selection" required="1"/>
</div>
<div>
<button name="action_website_create_new" type="object" string="Create a New Website" class="btn-secondary" icon="fa-arrow-right"/>
</div>
</div>
</div>
</div>
<h2>Website</h2>
<div class="row mt16 o_settings_container" id="webmaster_settings">
<div class="col-12 o_setting_box" id="website_action_setting">
<button name="website_go_to" type="object" string="Go to Website" class="btn btn-primary" icon="fa-globe"/>
<button name="%(website.action_website_add_features)d" type="action" string="Add features" class="ml-2 btn btn-secondary" icon="fa-plus"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="domain_setting">
<div class="o_setting_right_pane">
<label for="website_name" string="Website Title"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Name and favicon of your website
</div>
<div class="content-group">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Name" for="website_name"/>
<field name="website_name"/>
</div>
<div class="row">
<label class="col-lg-3 o_light_label" for="favicon" />
<field name="favicon" widget="image" class="float-left oe_avatar"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="company_settings" groups="base.group_multi_company">
<div class="o_setting_right_pane">
<label string="Company" for="website_company_id"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
The company this website belongs to
</div>
<field name="website_company_id"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="languages_setting">
<div class="o_setting_right_pane">
<label for="language_ids"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Languages available on your website
</div>
<div class="content-group">
<div class="mt16">
<field name="website_id" widget="selection" required="1"/>
<field name="language_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}"/>
</div>
<div>
<button name="action_website_create_new" type="object" string="Create a New Website" class="btn-secondary" icon="fa-arrow-right"/>
<field name="language_count" invisible="1"/>
<div class="mt8" attrs="{'invisible':[('language_count', '&lt;', 2)]}">
<label class="o_light_label mr8" string="Default" for="website_default_lang_id"/>
<field name="website_default_lang_id" widget="selection"/>
</div>
</div>
<div>
<button type="action" name="%(base.action_view_base_language_install)d" string="Install new language" class="btn-link" icon="fa-arrow-right"/>
</div>
</div>
</div>
<h2>Website</h2>
<div class="row mt16 o_settings_container" id="webmaster_settings">
<div class="col-12 o_setting_box" id="website_action_setting">
<button name="website_go_to" type="object" string="Go to Website" class="btn btn-primary" icon="fa-globe"/>
<button name="%(website.action_website_add_features)d" type="action" string="Add features" class="ml-2 btn btn-secondary" icon="fa-plus"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="domain_setting">
<div class="o_setting_right_pane">
<label for="website_name" string="Website Title"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Name and favicon of your website
</div>
<div class="content-group">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Name" for="website_name"/>
<field name="website_name"/>
</div>
<div class="row">
<label class="col-lg-3 o_light_label" for="favicon" />
<field name="favicon" widget="image" class="float-left oe_avatar"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="domain_settings" groups="website.group_multi_website">
<div class="o_setting_right_pane">
<label string="Domain" for="website_domain"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Display this website when users visit this domain
</div>
<div class="mt8">
<field name="website_domain"/>
</div>
<div class="mt8 text-muted" title="You can have 2 websites with same domain AND a condition on country group to select wich website use.">
Once the selection of available websites by domain is done, you can filter by country group.
</div>
<div class="mt8">
<field name="website_country_group_ids" widget="many2many_tags"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="company_settings" groups="base.group_multi_company">
<div class="o_setting_right_pane">
<label string="Company" for="website_company_id"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
The company this website belongs to
</div>
<field name="website_company_id"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="auth_signup_uninvited_setting">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="auth_signup_uninvited"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Let your customers log in to see their documents
</div>
<div class="mt8">
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" required="True"/>
</div>
<div class="content-group">
<button type="object" name="open_template_user" string="Default Access Rights" icon="fa-arrow-right" class="btn-link"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="languages_setting">
<div class="o_setting_right_pane">
<label for="language_ids"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Languages available on your website
</div>
<div class="content-group">
<div class="mt16">
<field name="language_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}"/>
</div>
<field name="language_count" invisible="1"/>
<div class="mt8" attrs="{'invisible':[('language_count', '&lt;', 2)]}">
<label class="o_light_label mr8" string="Default" for="website_default_lang_id"/>
<field name="website_default_lang_id" widget="selection"/>
</div>
</div>
<div>
<button type="action" name="%(base.action_view_base_language_install)d" string="Install new language" class="btn-link" icon="fa-arrow-right"/>
</div>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="google_analytics_setting">
<div class="o_setting_left_pane">
<field name="has_google_analytics"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="domain_settings" groups="website.group_multi_website">
<div class="o_setting_right_pane">
<label string="Domain" for="website_domain"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Display this website when users visit this domain
</div>
<div class="mt8">
<field name="website_domain"/>
</div>
<div class="mt8 text-muted" title="You can have 2 websites with same domain AND a condition on country group to select wich website use.">
Once the selection of available website by domain is done, you can filter by country group.
</div>
<div class="mt8">
<field name="website_country_group_ids" widget="many2many_tags"/>
<div class="o_setting_right_pane">
<label for="has_google_analytics"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Track visits in Google Analytics
</div>
<div class="content-group" attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Tracking ID" for="google_analytics_key"/>
<field name="google_analytics_key" placeholder="UA-XXXXXXXX-Y"
attrs="{'required': [('has_google_analytics', '=', True)]}"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="auth_signup_uninvited_setting">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="auth_signup_uninvited"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Let your customers log in to see their documents
</div>
<div class="mt8">
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" required="True"/>
</div>
<div class="content-group">
<button type="object" name="open_template_user" string="Default Access Rights" icon="fa-arrow-right" class="btn-link"/>
</div>
</div>
</div>
<div class="col-12 col-lg-offset-6 col-lg-6 o_setting_box" id="google_analytics_setting">
<div class="o_setting_left_pane">
<field name="has_google_analytics"/>
</div>
<div class="o_setting_right_pane">
<label for="has_google_analytics"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Track visits in Google Analytics
</div>
<div class="content-group" attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Tracking ID" for="google_analytics_key"/>
<field name="google_analytics_key" placeholder="UA-XXXXXXXX-Y"
attrs="{'required': [('has_google_analytics', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<a href="https://www.odoo.com/documentation/user/11.0/website/optimize/google_analytics.html"
class="oe_link" target="_blank">
<i class="fa fa-arrow-right"/>
How to get my Tracking ID
</a>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="google_analytics_dashboard_setting" attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<div class="o_setting_left_pane">
<field name="has_google_analytics_dashboard"/>
</div>
<div class="o_setting_right_pane">
<label for="has_google_analytics_dashboard"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Follow your website traffic in Odoo.
</div>
<div class="content-group" attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Client ID" for="google_management_client_id"/>
<field name="google_management_client_id" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
<div class="row">
<label class="col-lg-3 o_light_label" string="Client Secret" for="google_management_client_secret"/>
<field name="google_management_client_secret" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
<a href="https://www.odoo.com/documentation/user/online/website/optimize/google_analytics_dashboard.html"
<div attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<a href="https://www.odoo.com/documentation/user/11.0/website/optimize/google_analytics.html"
class="oe_link" target="_blank">
<i class="fa fa-arrow-right"/>
How to get my Client ID
</a>
</div>
<i class="fa fa-arrow-right"/>
How to get my Tracking ID
</a>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="google_maps_setting">
<div class="o_setting_left_pane">
<field name="has_google_maps"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="google_analytics_dashboard_setting" attrs="{'invisible': [('has_google_analytics', '=', False)]}">
<div class="o_setting_left_pane">
<field name="has_google_analytics_dashboard"/>
</div>
<div class="o_setting_right_pane">
<label for="has_google_analytics_dashboard"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Follow your website traffic in Odoo.
</div>
<div class="o_setting_right_pane">
<label for="has_google_maps"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Use Google Map on your website (<a href="/contactus">Contact Us</a> page, snippets, ...)
<div class="content-group" attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="Client ID" for="google_management_client_id"/>
<field name="google_management_client_id" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
<div class="content-group" attrs="{'invisible': [('has_google_maps', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="API Key" for="google_maps_api_key"/>
<field name="google_maps_api_key" attrs="{'required': [('has_google_maps', '=', True)]}" />
</div>
</div>
<div attrs="{'invisible': [('has_google_maps', '=', False)]}">
<a role="button" class="btn-link" target="_blank"
href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,static_maps_backend&amp;keyType=CLIENT_SIDE&amp;reusekey=true">
<i class="fa fa-arrow-right"/>
Create a Google Project and Get a Key
</a>
<div class="row">
<label class="col-lg-3 o_light_label" string="Client Secret" for="google_management_client_secret"/>
<field name="google_management_client_secret" attrs="{'required': [('has_google_analytics_dashboard', '=', True)]}"/>
</div>
</div>
<div attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
<a href="https://www.odoo.com/documentation/user/online/website/optimize/google_analytics_dashboard.html"
class="oe_link" target="_blank">
<i class="fa fa-arrow-right"/>
How to get my Client ID
</a>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" groups="website.group_multi_website">
<div class="o_setting_left_pane">
<field name="specific_user_account"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="google_maps_setting">
<div class="o_setting_left_pane">
<field name="has_google_maps"/>
</div>
<div class="o_setting_right_pane">
<label for="has_google_maps"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Use Google Map on your website (<a href="/contactus">Contact Us</a> page, snippets, ...)
</div>
<div class="o_setting_right_pane">
<label for="specific_user_account"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Force your user to create an account per website
<div class="content-group" attrs="{'invisible': [('has_google_maps', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" string="API Key" for="google_maps_api_key"/>
<field name="google_maps_api_key" attrs="{'required': [('has_google_maps', '=', True)]}" />
</div>
</div>
<div attrs="{'invisible': [('has_google_maps', '=', False)]}">
<a role="button" class="btn-link" target="_blank"
href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,static_maps_backend&amp;keyType=CLIENT_SIDE&amp;reusekey=true">
<i class="fa fa-arrow-right"/>
Create a Google Project and Get a Key
</a>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" groups="website.group_multi_website">
<div class="o_setting_left_pane">
<field name="specific_user_account"/>
</div>
<div class="o_setting_right_pane">
<label for="specific_user_account"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Force your user to create an account per website
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<label string="Social Media" for="social_twitter"/>
<span class="fa fa-lg fa-building" title="Values set here are company specific." groups="website.group_multi_website"/>
<div class="text-muted">
Add links to social media on your website
</div>
<div class="content-group">
<button type="object" name="company_go_to" string="Configure social media links" icon="fa-arrow-right" class="btn-link"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="cdn_setting" title="A CDN helps you serve your website’s content with high availability and high performance to any visitor wherever they are located." groups="base.group_no_one">
<div class="o_setting_left_pane">
<field name="cdn_activated"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="cdn_setting" title="A CDN helps you serve your website’s content with high availability and high performance to any visitor wherever they are located." groups="base.group_no_one">
<div class="o_setting_left_pane">
<field name="cdn_activated"/>
<div class="o_setting_right_pane">
<label for="cdn_activated"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Use a CDN to optimize the availability of your website's content
</div>
<div class="o_setting_right_pane">
<label for="cdn_activated"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Use a CDN to optimize the availability of your website's content
<div class="content-group" attrs="{'invisible': [('cdn_activated', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" for="cdn_url"/>
<field name="cdn_url"
attrs="{'required': [('cdn_activated', '=', True)]}"
placeholder="//mycompany.mycdn.com/"
t-translation="off"/>
</div>
<div class="content-group" attrs="{'invisible': [('cdn_activated', '=', False)]}">
<div class="row mt16">
<label class="col-lg-3 o_light_label" for="cdn_url"/>
<field name="cdn_url"
attrs="{'required': [('cdn_activated', '=', True)]}"
placeholder="//mycompany.mycdn.com/"
t-translation="off"/>
</div>
<div class="row" >
<label class="col-lg-3 o_light_label" for="cdn_filters"/>
<field name="cdn_filters" class="oe_inline"
attrs="{'required': [('cdn_activated', '=', True)]}"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="utm_tracker_settings" title="Analyze the efficiency of your marketing campaigns by using trackable UTM trackers (campaigns, medium, sources). Create trackers and follow clicks from the Promote menu of your website. Those trackers can be used in Google Analytics or in Odoo reports where you can see the opportunities and sales revenue generated thanks to your links.">
<div class="o_setting_left_pane">
<field name="module_website_links"/>
</div>
<div class="o_setting_right_pane">
<label for="module_website_links"/>
<div class="text-muted">
Track clicks on UTM links
</div>
</div>
</div>
<div id="multi_website" class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_multi_website"/>
</div>
<div class="o_setting_right_pane">
<label string="Multi-Websites" for="group_multi_website"/>
<div class="text-muted">
Manage multiple websites
<div class="row" >
<label class="col-lg-3 o_light_label" for="cdn_filters"/>
<field name="cdn_filters" class="oe_inline"
attrs="{'required': [('cdn_activated', '=', True)]}"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="utm_tracker_settings" title="Analyze the efficiency of your marketing campaigns by using trackable UTM trackers (campaigns, medium, sources). Create trackers and follow clicks from the Promote menu of your website. Those trackers can be used in Google Analytics or in Odoo reports where you can see the opportunities and sales revenue generated thanks to your links.">
<div class="o_setting_left_pane">
<field name="module_website_links"/>
</div>
<div class="o_setting_right_pane">
<label for="module_website_links"/>
<div class="text-muted">
Track clicks on UTM links
</div>
</div>
</div>
<div id="multi_website" class="col-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_multi_website"/>
</div>
<div class="o_setting_right_pane">
<label string="Multi-Websites" for="group_multi_website"/>
<div class="text-muted">
Manage multiple websites
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="has_social_network"/>
</div>
<div class="o_setting_right_pane">
<label string="Social Media" for="has_social_network"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<div class="text-muted">
Add links to social media on your website
</div>
<div class="content-group" attrs="{'invisible': [('has_social_network', '=', False)]}">
<div class="row">
<label for="social_twitter" string="Twitter" class="col-md-3 o_light_label"/>
<field name="social_twitter"/>
</div>
<div class="row">
<label for="social_facebook" string="Facebook" class="col-md-3 o_light_label"/>
<field name="social_facebook"/>
</div>
<div class="row">
<label for="social_github" string="GitHub" class="col-md-3 o_light_label"/>
<field name="social_github"/>
</div>
<div class="row">
<label for="social_linkedin" string="LinkedIn" class="col-md-3 o_light_label"/>
<field name="social_linkedin"/>
</div>
<div class="row">
<label for="social_youtube" string="YouTube" class="col-md-3 o_light_label"/>
<field name="social_youtube"/>
</div>
<div class="row">
<label for="social_googleplus" string="Google Plus" class="col-md-3 o_light_label"/>
<field name="social_googleplus"/>
</div>
<div class="row">
<label for="social_instagram" string="Instagram" class="col-md-3 o_light_label"/>
<field name="social_instagram"/>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>