[IMP] mass_mailing: Add a setting to enable the popup snippet on the website
[FIX] mass_mailing: Display attachments in a proper way [IMP] mass_mailing: set default value for popup_redirect_url, as it's sometimes required
This commit is contained in:
@@ -65,6 +65,7 @@ class MassMailingList(osv.Model):
|
||||
_defaults = {
|
||||
'active': True,
|
||||
'popup_content': _get_default_popup_content,
|
||||
'popup_redirect_url': '/',
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,4 +14,9 @@ class MassMailingConfiguration(osv.TransientModel):
|
||||
], "Campaigns",
|
||||
implied_group='mass_mailing.group_mass_mailing_campaign',
|
||||
help="""Manage mass mailign using Campaigns"""),
|
||||
'group_website_popup_on_exit': fields.selection([
|
||||
(0, 'Do not add extra content on website pages to encourage visitors to sign up'),
|
||||
(1, 'Allow the use of a pop-up snippet on website to encourage visitors to sign up on a mass mailing list')
|
||||
], string="Website Pop-up",
|
||||
implied_group="mass_mailing.group_website_popup_on_exit"),
|
||||
}
|
||||
|
||||
@@ -7,4 +7,9 @@
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="group_website_popup_on_exit" model="res.groups">
|
||||
<field name="name">Use subscription pop up on the website</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -274,11 +274,11 @@
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Consumer Newsletter"/>
|
||||
</h1>
|
||||
<group>
|
||||
<group groups="mass_mailing.group_website_popup_on_exit">
|
||||
<field name="popup_redirect_url"/>
|
||||
</group>
|
||||
</div>
|
||||
<notebook>
|
||||
<notebook groups="mass_mailing.group_website_popup_on_exit">
|
||||
<page string="Popup Content">
|
||||
<field name="popup_content" widget="html_frame" options="{'editor_url': '/website_mass_mailing/field/popup_content'}"/>
|
||||
</page>
|
||||
@@ -466,7 +466,10 @@
|
||||
placeholder="Select mailing lists..." class="oe_inline"
|
||||
on_change="on_change_model_and_list(mailing_model, contact_list_ids)"/>
|
||||
</div>
|
||||
<field name="attachment_ids" widget="many2many_binary" string="Attach a file"/>
|
||||
</div>
|
||||
<label for="attachment_ids"/>
|
||||
<div>
|
||||
<field name="attachment_ids" widget="many2many_binary" string="Attach a file" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<notebook>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
</header>
|
||||
<group string="Mass Mailing">
|
||||
<field name="group_mass_mailing_campaign" widget="radio"/>
|
||||
<field name="group_website_popup_on_exit" widget="radio"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<template id="website_popup_snippet" name="popup snippet" inherit_id="website.snippets">
|
||||
<xpath expr="//div[@id='snippet_feature']/div[@class='o_panel_body']" position="inside">
|
||||
<div>
|
||||
<div groups="mass_mailing.group_website_popup_on_exit">
|
||||
<div class="oe_snippet_thumbnail">
|
||||
<img class="oe_snippet_thumbnail_img" src="/mass_mailing/static/src/img/blocks/bounce.png" />
|
||||
<span class="oe_snippet_thumbnail_title">Newsletter Popup</span>
|
||||
|
||||
Reference in New Issue
Block a user