[IMP] mass_mailing: remove depends to website. Create a website_mass_mailing bridge to add subscribe snippet into website builder. Split website_links to have link_tracker to create short and trackable URLs, and website_links to have a website layout for link_tracker and add button to share page.

This commit is contained in:
Christophe Matthieu
2015-07-10 17:00:15 +02:00
parent 2868a86401
commit fd5361c0f7
41 changed files with 437 additions and 341 deletions
+3
View File
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
import models
import controller
+15
View File
@@ -0,0 +1,15 @@
{
'name': 'Link Tracker',
'category': 'Hidden',
'description': """
Create short and trackable URLs.
=====================================================
""",
'version': '1.0',
'depends': ['marketing', 'utm'],
'data': [
'views/link_tracker.xml',
'security/ir.model.access.csv',
],
}
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
import website_links
import main
+13
View File
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
import werkzeug
from openerp.addons.web import http
from openerp.http import request
class link_tracker(http.Controller):
@http.route('/r/<string:code>', type='http', auth='none', website=True)
def full_url_redirect(self, code, **post):
request.env['link.tracker.click'].add_click(code, request.httprequest.remote_addr, request.session['geoip'].get('country_code'), stat_id=False)
redirect_url = request.env['link.tracker'].get_url_from_code(code)
return werkzeug.utils.redirect(redirect_url or '', 301)
+2
View File
@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
import link_tracker
@@ -21,12 +21,13 @@ def VALIDATE_URL(url):
return url
class website_links(models.Model):
"""website_links allow users to wrap any URL into a short and trackable URL
via a frontend and backend interface. website_links counts clicks on each tracked link.
class link_tracker(models.Model):
"""link_tracker allow users to wrap any URL into a short and trackable URL.
link_tracker counts clicks on each tracked link.
This module is also used by mass_mailing, where each link in mail_mail html_body are converted into
a trackable link to get the click-through rate of each mass_mailing."""
_name = "website.links"
_name = "link.tracker"
_rec_name = "short_url"
_inherit = ['utm.mixin']
@@ -34,10 +35,10 @@ class website_links(models.Model):
url = fields.Char(string='Target URL', required=True)
count = fields.Integer(string='Number of Clicks', compute='_compute_count', store=True)
short_url = fields.Char(string='Tracked URL', compute='_compute_short_url')
link_click_ids = fields.One2many('website.links.click', 'link_id', string='Clicks')
link_click_ids = fields.One2many('link.tracker.click', 'link_id', string='Clicks')
title = fields.Char(string='Page Title', store=True)
favicon = fields.Char(string='Favicon', compute='_compute_favicon', store=True)
link_code_ids = fields.One2many('website.links.code', 'link_id', string='Codes')
link_code_ids = fields.One2many('link.tracker.code', 'link_id', string='Codes')
code = fields.Char(string='Short URL code', compute='_compute_code')
redirected_url = fields.Char(string='Redirected URL', compute='_compute_redirected_url')
short_url_host = fields.Char(string='Host of the short URL', compute='_compute_short_url_host')
@@ -81,7 +82,7 @@ class website_links(models.Model):
@api.one
def _compute_code(self):
record = self.env['website.links.code'].search([('link_id', '=', self.id)], limit=1, order='id DESC')
record = self.env['link.tracker.code'].search([('link_id', '=', self.id)], limit=1, order='id DESC')
self.code = record.code
@api.one
@@ -127,7 +128,7 @@ class website_links(models.Model):
@api.multi
def action_view_statistics(self):
action = self.env['ir.actions.act_window'].for_xml_id('website_links', 'action_view_click_statistics')
action = self.env['ir.actions.act_window'].for_xml_id('link_tracker', 'action_view_click_statistics')
action['domain'] = [('link_id', '=', self.id)]
return action
@@ -177,16 +178,16 @@ class website_links(models.Model):
if fname not in create_vals:
create_vals[fname] = False
link = super(website_links, self).create(create_vals)
link = super(link_tracker, self).create(create_vals)
code = self.env['website.links.code'].get_random_code_string()
self.env['website.links.code'].create({'code': code, 'link_id': link.id})
code = self.env['link.tracker.code'].get_random_code_string()
self.env['link.tracker.code'].create({'code': code, 'link_id': link.id})
return link
@api.model
def get_url_from_code(self, code, context=None):
code_rec = self.env['website.links.code'].sudo().search([('code', '=', code)])
code_rec = self.env['link.tracker.code'].sudo().search([('code', '=', code)])
if not code_rec:
return None
@@ -198,11 +199,11 @@ class website_links(models.Model):
]
class website_links_code(models.Model):
_name = "website.links.code"
class link_tracker_code(models.Model):
_name = "link.tracker.code"
code = fields.Char(string='Short URL Code', store=True)
link_id = fields.Many2one('website.links', 'Link', required=True, ondelete='cascade')
link_id = fields.Many2one('link.tracker', 'Link', required=True, ondelete='cascade')
@api.model
def get_random_code_string(self):
@@ -220,19 +221,19 @@ class website_links_code(models.Model):
]
class website_links_click(models.Model):
_name = "website.links.click"
class link_tracker_click(models.Model):
_name = "link.tracker.click"
_rec_name = "link_id"
click_date = fields.Date(string='Create Date')
link_id = fields.Many2one('website.links', 'Link', required=True, ondelete='cascade')
link_id = fields.Many2one('link.tracker', 'Link', required=True, ondelete='cascade')
ip = fields.Char(string='Internet Protocol')
country_id = fields.Many2one('res.country', 'Country')
@api.model
def add_click(self, code, ip, country_code, stat_id=False):
self = self.sudo()
code_rec = self.env['website.links.code'].search([('code', '=', code)])
code_rec = self.env['link.tracker.code'].search([('code', '=', code)])
if not code_rec:
return None
@@ -0,0 +1,10 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_link_tracker_user,link.tracker,model_link_tracker,base.group_user,1,0,0,0
access_link_tracker_manager,link.tracker,model_link_tracker,marketing.group_marketing_user,1,1,1,1
access_link_tracker_public,link.tracker,model_link_tracker,base.group_public,1,0,0,0
access_link_tracker_code_user,link.tracker.code,model_link_tracker_code,base.group_user,1,0,0,0
access_link_tracker_code_manager,link.tracker.code,model_link_tracker_code,marketing.group_marketing_user,1,1,1,1
access_link_tracker_code_public,link.tracker.code,model_link_tracker_code,base.group_public,1,0,0,0
access_link_tracker_click_user,link.tracker.click,model_link_tracker_click,base.group_user,1,0,0,0
access_link_tracker_click_manager,link.tracker.click,model_link_tracker_click,marketing.group_marketing_user,1,1,1,1
access_link_tracker_click_public,link.tracker.click,model_link_tracker_click,base.group_public,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_link_tracker_user link.tracker model_link_tracker base.group_user 1 0 0 0
3 access_link_tracker_manager link.tracker model_link_tracker marketing.group_marketing_user 1 1 1 1
4 access_link_tracker_public link.tracker model_link_tracker base.group_public 1 0 0 0
5 access_link_tracker_code_user link.tracker.code model_link_tracker_code base.group_user 1 0 0 0
6 access_link_tracker_code_manager link.tracker.code model_link_tracker_code marketing.group_marketing_user 1 1 1 1
7 access_link_tracker_code_public link.tracker.code model_link_tracker_code base.group_public 1 0 0 0
8 access_link_tracker_click_user link.tracker.click model_link_tracker_click base.group_user 1 0 0 0
9 access_link_tracker_click_manager link.tracker.click model_link_tracker_click marketing.group_marketing_user 1 1 1 1
10 access_link_tracker_click_public link.tracker.click model_link_tracker_click base.group_public 1 0 0 0
@@ -3,15 +3,15 @@
<data>
<record model="ir.actions.act_window" id="action_view_click_statistics">
<field name="name">Statistics of Clicks</field>
<field name="res_model">website.links.click</field>
<field name="res_model">link.tracker.click</field>
<field name="view_mode">graph</field>
<field name="domain">[('link_id', 'IN', ids)]</field>
</record>
<!-- Search -->
<record id="view_website_links_filter" model="ir.ui.view">
<record id="view_link_tracker_filter" model="ir.ui.view">
<field name="name">Links</field>
<field name="model">website.links</field>
<field name="model">link.tracker</field>
<field name="arch" type="xml">
<search string="Tracked Link">
<field name="title"/>
@@ -21,9 +21,9 @@
</record>
<!-- Website links views -->
<record id="view_website_links_form" model="ir.ui.view">
<field name="name">website.links.form</field>
<field name="model">website.links</field>
<record id="view_link_tracker_form" model="ir.ui.view">
<field name="name">link.tracker.form</field>
<field name="model">link.tracker</field>
<field name="arch" type="xml">
<form string="Website Link">
<sheet>
@@ -53,9 +53,9 @@
</record>
<record id="view_website_links_form_stats" model="ir.ui.view">
<field name="name">website.links.my.form</field>
<field name="model">website.links</field>
<record id="view_link_tracker_form_stats" model="ir.ui.view">
<field name="name">link.tracker.my.form</field>
<field name="model">link.tracker</field>
<field name="arch" type="xml">
<form string="Website Link Graph">
<sheet>
@@ -71,17 +71,17 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_website_links_stats">
<field name="name">website.links.form.graph.action</field>
<field name="res_model">website.links</field>
<record model="ir.actions.act_window" id="action_link_tracker_stats">
<field name="name">link.tracker.form.graph.action</field>
<field name="res_model">link.tracker</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_website_links_form_stats"/>
<field name="view_id" ref="view_link_tracker_form_stats"/>
</record>
<record id="view_website_links_tree" model="ir.ui.view">
<field name="name">website.links.tree</field>
<field name="model">website.links</field>
<record id="view_link_tracker_tree" model="ir.ui.view">
<field name="name">link.tracker.tree</field>
<field name="model">link.tracker</field>
<field name="arch" type="xml">
<tree string="Website Links">
<field name="create_date"/>
@@ -93,9 +93,9 @@
</field>
</record>
<record id="view_website_links_graph" model="ir.ui.view" >
<field name="name">website.links.graph</field>
<field name="model">website.links</field>
<record id="view_link_tracker_graph" model="ir.ui.view" >
<field name="name">link.tracker.graph</field>
<field name="model">link.tracker</field>
<field name="arch" type="xml">
<graph string="Website Links" type="bar">
<field name="url" type="row"/>
@@ -105,17 +105,17 @@
</record>
<!-- Action for website links-->
<record model="ir.actions.act_window" id="action_website_links">
<record model="ir.actions.act_window" id="action_link_tracker">
<field name="name">Link Tracker</field>
<field name="res_model">website.links</field>
<field name="res_model">link.tracker</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
</record>
<!-- Website links click views -->
<record id="view_website_links_click_form" model="ir.ui.view">
<field name="name">website.links.click.form</field>
<field name="model">website.links.click</field>
<record id="view_link_tracker_click_form" model="ir.ui.view">
<field name="name">link.tracker.click.form</field>
<field name="model">link.tracker.click</field>
<field name="arch" type="xml">
<form string="Website Link Clicks">
<header>
@@ -131,9 +131,9 @@
</field>
</record>
<record id="view_website_links_click_tree" model="ir.ui.view">
<field name="name">website.links.click.tree</field>
<field name="model">website.links.click</field>
<record id="view_link_tracker_click_tree" model="ir.ui.view">
<field name="name">link.tracker.click.tree</field>
<field name="model">link.tracker.click</field>
<field name="arch" type="xml">
<tree string="Website Links Clicks">
<field name="link_id"/>
@@ -143,9 +143,9 @@
</field>
</record>
<record id="view_website_links_click_graph" model="ir.ui.view" >
<field name="name">website.links.click.graph</field>
<field name="model">website.links.click</field>
<record id="view_link_tracker_click_graph" model="ir.ui.view" >
<field name="name">link.tracker.click.graph</field>
<field name="model">link.tracker.click</field>
<field name="arch" type="xml">
<graph string="Website Link Clicks">
<field name="link_id"/>
@@ -156,14 +156,14 @@
</record>
<!-- Action for website links click-->
<record model="ir.actions.act_window" id="action_website_links_click">
<record model="ir.actions.act_window" id="action_link_tracker_click">
<field name="name">Tracked Links</field>
<field name="res_model">website.links.click</field>
<field name="res_model">link.tracker.click</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
</record>
<menuitem id="menu_url_shortener_main" name="Link Tracker" parent="utm.menu_link_tracker_root" groups="base.group_no_one"/>
<menuitem id="menu_url_shortener_links" name="Tracked Links" parent="menu_url_shortener_main" action="action_website_links"/>
<menuitem id="menu_url_shortener_links" name="Tracked Links" parent="menu_url_shortener_main" action="action_link_tracker"/>
</data>
</openerp>
+3 -5
View File
@@ -16,9 +16,10 @@ professional emails and reuse templates in a few clicks.
'depends': [
'mail',
'marketing',
'web_kanban_gauge',
'website_links',
'utm',
'link_tracker',
'web_editor',
'web_kanban_gauge',
],
'data': [
'data/mail_data.xml',
@@ -29,11 +30,8 @@ professional emails and reuse templates in a few clicks.
'views/mass_mailing.xml',
'views/res_config.xml',
'views/email_template.xml',
'views/website_mass_mailing.xml',
'security/ir.model.access.csv',
'views/mass_mailing.xml',
'views/unsubscribe.xml',
'views/snippets.xml',
'views/editor_field_html.xml',
'views/snippets_themes.xml',
'views/snippets_themes_options.xml',
+2 -64
View File
@@ -19,70 +19,8 @@ class MassMailController(http.Controller):
return response
@http.route(['/mail/mailing/<int:mailing_id>/unsubscribe'], type='http', website=True, auth='none')
def mailing(self, mailing_id, email=None, res_id=None, **post):
mailing = request.env['mail.mass_mailing'].sudo().browse(mailing_id)
if mailing.exists():
if mailing.mailing_model == 'mail.mass_mailing.contact':
contacts =request.env['mail.mass_mailing.contact'].sudo().search([('email', 'ilike', email)])
return request.website.render('mass_mailing.page_unsubscribe', {'contacts': contacts, 'email': email, 'mailing_id':mailing_id})
else:
mailing.update_opt_out(mailing_id, email, [res_id], True)
return request.website.render('mass_mailing.page_unsubscribed')
@http.route(['/mail/mailing/unsubscribe'], type='json', auth='none')
def unsubscribe(self, mailing_id, opt_in_ids, opt_out_ids, email):
mailing = request.env['mail.mass_mailing'].sudo().browse(mailing_id)
if mailing.exists():
mailing.update_opt_out(mailing_id, email, opt_in_ids, False)
mailing.update_opt_out(mailing_id, email, opt_out_ids, True)
@http.route('/website_mass_mailing/is_subscriber', type='json', website=True, auth="public")
def is_subscriber(self, list_id, **post):
cr, uid, context = request.cr, request.uid, request.context
Contacts = request.registry['mail.mass_mailing.contact']
Users = request.registry['res.users']
is_subscriber = False
email = None
if uid != request.website.user_id.id:
email = Users.browse(cr, SUPERUSER_ID, uid, context).email
elif request.session.get('mass_mailing_email'):
email = request.session['mass_mailing_email']
if email:
contact_ids = Contacts.search(cr, SUPERUSER_ID, [('list_id', '=', int(list_id)), ('email', '=', email), ('opt_out', '=', False)], context=context)
is_subscriber = len(contact_ids) > 0
return {'is_subscriber': is_subscriber, 'email': email}
@http.route('/website_mass_mailing/subscribe', type='json', auth="public")
def subscribe(self, list_id, email, **post):
cr, uid, context = request.cr, request.uid, request.context
Contacts = request.registry['mail.mass_mailing.contact']
contact_ids = Contacts.search_read(cr, SUPERUSER_ID, [('list_id', '=', int(list_id)), ('email', '=', email)], ['opt_out'], context=context)
if not contact_ids:
Contacts.add_to_list(cr, SUPERUSER_ID, email, int(list_id), context=context)
else:
if contact_ids[0]['opt_out']:
Contacts.write(cr, SUPERUSER_ID, [contact_ids[0]['id']], {'opt_out': False}, context=context)
# add email to session
request.session['mass_mailing_email'] = email
return True
@http.route('/r/<string:code>/m/<int:stat_id>', type='http', auth="none")
def full_url_redirect(self, code, stat_id, **post):
cr, uid, context = request.cr, request.uid, request.context
request.registry['website.links.click'].add_click(cr, uid, code, request.httprequest.remote_addr, request.session['geoip'].get('country_code'), stat_id=stat_id, context=context)
return werkzeug.utils.redirect(request.registry['website.links'].get_url_from_code(cr, uid, code, context=context), 301)
@http.route(['/website_mass_mailing/get_content'], type='json', auth="public")
def get_mass_mailing_content(self, newsletter_id, **post):
data = self.is_subscriber(newsletter_id, **post)
mass_mailing_list = request.registry['mail.mass_mailing.list'].browse(request.cr, SUPERUSER_ID, int(newsletter_id), request.context)
data.update({
'content': mass_mailing_list.popup_content,
'redirect_url': mass_mailing_list.popup_redirect_url
})
return data
request.registry['link.tracker.click'].add_click(cr, uid, code, request.httprequest.remote_addr, request.session['geoip'].get('country_code'), stat_id=stat_id, context=context)
return werkzeug.utils.redirect(request.registry['link.tracker'].get_url_from_code(cr, uid, code, context=context), 301)
@@ -21,4 +21,5 @@ class Web_Editor(Web_Editor):
@http.route(['/mass_mailing/snippets'], type='json', auth="user", website=True)
def mass_mailing_snippets(self):
return request.registry["ir.ui.view"].render(request.cr, request.uid, 'mass_mailing.email_designer_snippets', None, context=request.context)
values = {'company_id': request.env['res.users'].browse(request.uid).company_id}
return request.registry["ir.ui.view"].render(request.cr, request.uid, 'mass_mailing.email_designer_snippets', values, context=request.context)
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -6,4 +6,4 @@ import mail_mail
import mail_thread
import res_config
import mass_mailing_report
import website_links
import link_tracker
@@ -1,15 +1,15 @@
from openerp import fields
from openerp import models
class website_links(models.Model):
_inherit = "website.links"
class link_tracker(models.Model):
_inherit = "link.tracker"
mass_mailing_id = fields.Many2one('mail.mass_mailing', string='Mass Mailing')
mass_mailing_campaign_id = fields.Many2one('mail.mass_mailing.campaign', string='Mass Mailing Campaign')
class website_links_click(models.Model):
_inherit = "website.links.click"
class link_tracker_click(models.Model):
_inherit = "link.tracker.click"
mail_stat_id = fields.Many2one('mail.mail.statistics', string='Mail Statistics')
mass_mailing_id = fields.Many2one('mail.mass_mailing', string='Mass Mailing')
mass_mailing_campaign_id = fields.Many2one('mail.mass_mailing.campaign', string='Mass Mailing Campaign')
mass_mailing_campaign_id = fields.Many2one('mail.mass_mailing.campaign', string='Mass Mailing Campaign')
+4 -4
View File
@@ -208,7 +208,7 @@ class MassMailingCampaign(osv.Model):
cr.execute("""
SELECT COUNT(DISTINCT(stats.id)) AS nb_mails, COUNT(DISTINCT(clicks.mail_stat_id)) AS nb_clicks, stats.mass_mailing_campaign_id AS id
FROM mail_mail_statistics AS stats
LEFT OUTER JOIN website_links_click AS clicks ON clicks.mail_stat_id = stats.id
LEFT OUTER JOIN link_tracker_click AS clicks ON clicks.mail_stat_id = stats.id
WHERE stats.mass_mailing_campaign_id IN %s
GROUP BY stats.mass_mailing_campaign_id
""", (tuple(ids), ))
@@ -436,7 +436,7 @@ class MassMailing(osv.Model):
cr.execute("""
SELECT COUNT(DISTINCT(stats.id)) AS nb_mails, COUNT(DISTINCT(clicks.mail_stat_id)) AS nb_clicks, stats.mass_mailing_id AS id
FROM mail_mail_statistics AS stats
LEFT OUTER JOIN website_links_click AS clicks ON clicks.mail_stat_id = stats.id
LEFT OUTER JOIN link_tracker_click AS clicks ON clicks.mail_stat_id = stats.id
WHERE stats.mass_mailing_id IN %s
GROUP BY stats.mass_mailing_id
""", (tuple(ids), ))
@@ -583,7 +583,7 @@ class MassMailing(osv.Model):
def mass_mailing_statistics_action(self, cr, uid, ids, context=None):
res = self.pool['ir.actions.act_window'].for_xml_id(cr, uid, 'mass_mailing', 'action_view_mass_mailing_statistics', context=context)
link_click_ids = self.pool['website.links.click'].search(cr, uid, [('mass_mailing_id', 'in', ids)], context=context)
link_click_ids = self.pool['link.tracker.click'].search(cr, uid, [('mass_mailing_id', 'in', ids)], context=context)
res['domain'] = [('id', 'in', link_click_ids)]
return res
@@ -796,7 +796,7 @@ class MassMailing(osv.Model):
if utm_mixin.medium_id:
vals['medium_id'] = utm_mixin.medium_id.id
res[mass_mailing.id] = self.pool['website.links'].convert_links(cr, uid, html, vals, blacklist=['/unsubscribe_from_list'], context=context)
res[mass_mailing.id] = self.pool['link.tracker'].convert_links(cr, uid, html, vals, blacklist=['/unsubscribe_from_list'], context=context)
return res
@@ -78,7 +78,7 @@ class MailMailStats(osv.Model):
'opened': fields.datetime('Opened', help='Date when the email has been opened the first time'),
'replied': fields.datetime('Replied', help='Date when this email has been replied for the first time.'),
'bounced': fields.datetime('Bounced', help='Date when this email has bounced.'),
'links_click_ids': fields.one2many('website.links.click', 'mail_stat_id', 'Links click'),
'links_click_ids': fields.one2many('link.tracker.click', 'mail_stat_id', 'Links click'),
'state': fields.function(_compute_state, string='State', type="selection", multi="state",
selection=[('outgoing', 'Outgoing'),
('exception', 'Exception'),
@@ -1,4 +1,4 @@
odoo.define('website_mail.website_mail', function (require) {
odoo.define('mass_mailing.editor', function (require) {
"use strict";
var Model = require('web.Model');
@@ -36,7 +36,7 @@ options.registry["width-x"] = options.Class.extend({
if ($handle.hasClass(handler)) { compass = handler; }
});
if(self.is_image){ compass = "image"; }
self.BuildingBlock.editor_busy = true;
self.buildingBlock.editor_busy = true;
var $body = $(document.body);
@@ -63,7 +63,7 @@ options.registry["width-x"] = options.Class.extend({
var body_mouseup = function(){
$body.unbind('mousemove', body_mousemove);
$body.unbind('mouseup', body_mouseup);
self.BuildingBlock.editor_busy = false;
self.buildingBlock.editor_busy = false;
self.$target.removeClass("resize_editor_busy");
};
$body.mousemove(body_mousemove);
@@ -78,7 +78,7 @@ options.registry["width-x"] = options.Class.extend({
var width = offset + target_width - event.pageX;
}
target.css("width", width + "px");
self.BuildingBlock.cover_target(self.$overlay, self.$target);
self.buildingBlock.cover_target(self.$overlay, self.$target);
return;
},
get_int_width: function ($el) {
@@ -106,7 +106,7 @@ options.registry["width-x"] = options.Class.extend({
});
}
this._super($clone);
this.BuildingBlock.cover_target(this.$overlay, this.$target);
this.buildingBlock.cover_target(this.$overlay, this.$target);
},
on_remove: function () {
var remove_index = $(this.$target).index();
@@ -118,7 +118,7 @@ options.registry["width-x"] = options.Class.extend({
});
}
this._super();
this.BuildingBlock.cover_target(this.$overlay, this.$target);
this.buildingBlock.cover_target(this.$overlay, this.$target);
},
});
@@ -168,6 +168,9 @@ web_editor.Class.include({
$("#choose_template").children().toggleClass("hidden");
$("body").trigger("resize");
$(window.top).trigger('resize');
setTimeout(function () {
$(".note-popover").toggleClass("hidden", $("#templates").is(":visible"));
},0);
},
on_set_snippet_template: function (event) {
var $editable = $("#editable_area");
+7 -7
View File
@@ -329,8 +329,8 @@
</record>
<record model="ir.ui.view" id="view_mail_mass_mailing_links_tree">
<field name="name">website.links.tree</field>
<field name="model">website.links</field>
<field name="name">link.tracker.tree</field>
<field name="model">link.tracker</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<tree string="Mailing Statistics of Clicks">
@@ -342,9 +342,9 @@
</record>
<record model="ir.ui.view" id="view_mail_mass_mailing_links_search">
<field name="name">website.links.search</field>
<field name="model">website.links</field>
<field name="inherit_id" ref="website_links.view_website_links_filter"/>
<field name="name">link.tracker.search</field>
<field name="model">link.tracker</field>
<field name="inherit_id" ref="link_tracker.view_link_tracker_filter"/>
<field name="arch" type="xml">
<search string="Tracked Link">
<field name="mass_mailing_id"/>
@@ -355,7 +355,7 @@
<record model="ir.actions.act_window" id="action_view_mass_mailing_links_statistics">
<field name="name">Statistics of Clicks</field>
<field name="res_model">website.links</field>
<field name="res_model">link.tracker</field>
<field name="view_mode">tree</field>
<field name="context">{'search_default_mass_mailing_id': active_id}</field>
</record>
@@ -709,7 +709,7 @@
<record model="ir.actions.act_window" id="dropdb snipp">
<field name="name">Statistics of Clicks</field>
<field name="res_model">website.links</field>
<field name="res_model">link.tracker</field>
<field name="view_mode">tree</field>
<field name="context">{'search_default_mass_mailing_campaign_id': active_id}</field>
</record>
+17 -10
View File
@@ -56,7 +56,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -74,7 +74,7 @@
<tr>
<td valign="center" style="text-align:center;font-size: 30px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: inherit;">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: inherit;">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -91,13 +91,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px;">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse;background:inherit;color:inherit">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse;background:inherit;color:inherit">
<tr>
<td align="right">
<a t-att-href="(website.social_facebook) or '#'"><img src="/mass_mailing/static/src/img/theme_imgs/social_facebook.png" style="height:auto;max-width:70px" alt="social icon"/></a>
@@ -128,13 +128,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px;font-size: 30px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: inherit">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: inherit">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse;background:inherit;color:inherit">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse;background:inherit;color:inherit">
<tr>
<td align="right">
<a t-att-href="(website.social_facebook) or '#'"><img src="/mass_mailing/static/src/img/theme_imgs/social_facebook.png" style="height:auto;max-width:70px" alt="social icon" /></a>
@@ -343,7 +343,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;background:inherit;color:inherit;border-collapse:collapse;color:inherit">
<tr>
<td style="padding:10px 30px;font-size:14px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -401,7 +401,7 @@
</span> Footers
</div>
<div class="o_panel_body">
<div name="Social + Text" class="basic_theme o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="basic_theme o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #FFFFFF repeat top /100%;color:#777777">
<table style="margin: 0 auto;border-collapse:collapse;background:inherit;color:inherit;width:600px" cellpadding="0" cellspacing="0">
<tbody>
@@ -459,7 +459,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding:10px">
&amp;nbsp;
<a style="color:inherit" href="/unsubscribe_from_list">Unsubscribe</a> | <a style="color:inherit" href="/page/contactus">Contact</a>
<a style="color:inherit" href="/unsubscribe_from_list">Unsubscribe</a>
<t t-if="website"> | <a style="color:inherit" href="/page/contactus">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -481,7 +482,13 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:20px;text-align:center">
&amp;nbsp;
<a style="color:inherit" href="/page/contactus">Contact Us</a> | <a style="color:inherit" t-att-href="(website.social_facebook) or '#'">Facebook</a> | <a style="color:inherit" t-att-href="(website.social_twitter) or '#'">Twitter</a> | <a style="color:inherit" href="#">Support</a> | <a href="/unsubscribe_from_list" style="color:inherit">Unsubscribe</a>
<t t-if="website">
<a style="color:inherit" href="/page/contactus">Contact Us</a> |
<a style="color:inherit" t-att-href="(website.social_facebook) or '#'">Facebook</a> |
<a style="color:inherit" t-att-href="(website.social_twitter) or '#'">Twitter</a> |
<a style="color:inherit" href="#">Support</a> |
</t>
<a href="/unsubscribe_from_list" style="color:inherit">Unsubscribe</a>
&amp;nbsp;
</td>
</tr>
@@ -11,7 +11,7 @@
<tr>
<td width="100%" valign="top" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -30,7 +30,7 @@
<tr>
<td width="100%" valign="top" style="text-align:center;font-size: 30px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#464646">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#464646">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -48,13 +48,13 @@
<tr>
<td width="100%" valign="top" style="font-size: 30px;padding-left:5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -99,13 +99,13 @@
<tr>
<td width="100%" valign="top" style="vertical-align: middle;padding-left:5px;font-size: 30px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#464646">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#464646">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -267,7 +267,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -277,14 +277,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -482,7 +482,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;color:inherit">
<tr>
<td style="padding:10px 30px;font-size:14px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -602,7 +602,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="airmail o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="airmail o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #E5E5E5 repeat top /100%;color:#464646">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:100%;border-collapse:collapse;color:inherit">
@@ -653,7 +653,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding:10px;color:#464646">
&amp;nbsp;
<a href="/unsubscribe_from_list" style="color:#464646">Unsubscribe</a> | <a href="/page/contactus" style="color:#464646">Contact</a>
<a href="/unsubscribe_from_list" style="color:#464646">Unsubscribe</a>
<t t-if="website"> | <a href="/page/contactus" style="color:#464646">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -675,12 +676,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:10px;text-align:center">
&amp;nbsp;
<a href="/page/contactus" style="padding-right:3px;color:#464646">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="padding-right:3px;color:#464646">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="padding-right:3px;color:#464646">Twitter</a> |
<t t-if="website">
<a href="/page/contactus" style="padding-right:3px;color:#464646">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="padding-right:3px;color:#464646">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="padding-right:3px;color:#464646">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#464646">Unsubscribe</a>
&amp;nbsp;
@@ -10,7 +10,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -28,7 +28,7 @@
<tr>
<td style="font-size: 30px; text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#414141">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#414141">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -45,13 +45,13 @@
<tr>
<td width="100%" valign="top" style="font-size: 30px;padding-left:5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="height:auto;max-width:600px;width:200px;padding:10px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -95,13 +95,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #414141;font-size: 30px; text-align:center">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #414141;font-size: 30px; text-align:center">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -276,7 +276,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -286,14 +286,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -466,7 +466,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;color:inherit">
<tr>
<td style="padding:10px 30px;font-size:14px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -586,7 +586,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="cleave o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="cleave o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #E6E5E5 repeat top /100%;color:#414141">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:100%;border-collapse:collapse;color:inherit">
@@ -635,7 +635,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding-top:10px;padding-bottom:5px">
&amp;nbsp;
<a href="/unsubscribe_from_list" style="color:#414141">Unsubscribe</a> | <a href="/page/contactus" style="color:#414141">Contact</a>
<a href="/unsubscribe_from_list" style="color:#414141">Unsubscribe</a>
<t t-if="website"> | <a href="/page/contactus" style="color:#414141">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -657,12 +658,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:10px;text-align:center">
&amp;nbsp;
<a href="/page/contactus" style="color:#414141">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="color:#414141">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="color:#414141">Twitter</a> |
<t t-if="website">
<a href="/page/contactus" style="color:#414141">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="color:#414141">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="color:#414141">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#414141">Unsubscribe</a>
&amp;nbsp;
+21 -18
View File
@@ -10,7 +10,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -28,7 +28,7 @@
<tr>
<td style="font-size: 30px; text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#fff">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#fff">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -45,13 +45,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -95,13 +95,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px;font-size: 30px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #fff">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #fff">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -248,7 +248,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -258,14 +258,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -511,7 +511,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;color:inherit">
<tr>
<td style="padding:10px 30px;font-size:14px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -631,7 +631,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="go o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="go o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #2B934F repeat top /100%;color:#EEEEEE">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:100%;border-collapse:collapse;color:inherit">
@@ -682,7 +682,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding:10px;color:#fff">
&amp;nbsp;
<a style="color:#fff" href="/unsubscribe_from_list">Unsubscribe</a> | <a style="color:#fff" href="/page/contactus">Contact</a>
<a style="color:#fff" href="/unsubscribe_from_list">Unsubscribe</a>
<t t-if="website"> | <a style="color:#fff" href="/page/contactus">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -704,12 +705,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:20px;text-align:center">
&amp;nbsp;
<a style="color:#fff" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#fff" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#fff" t-att-href="website.social_twitter">Twitter</a> |
<t t-if="website">
<a style="color:#fff" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#fff" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#fff" t-att-href="website.social_twitter">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#fff">Unsubscribe</a>
&amp;nbsp;
@@ -10,7 +10,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -28,7 +28,7 @@
<tr>
<td style="font-size: 30px; text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#fff">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#fff">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -45,13 +45,13 @@
<tr>
<td valign="center" width="270" style="padding-left:5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="height:auto;max-width:600px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -95,13 +95,13 @@
<tr>
<td valign="center" width="270" style="padding-left:5px;font-size:30px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #fff">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #fff">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -314,7 +314,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -324,14 +324,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -483,7 +483,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;color:inherit">
<tr>
<td style="padding:10px 30px;font-size:14px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -603,7 +603,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="narrative o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="narrative o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #1F1F1F repeat top /100%;color:#fff">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:600px;border-collapse:collapse;color:inherit">
@@ -654,7 +654,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding-top:10px;padding-bottom:5px;color:#fff">
&amp;nbsp;
<a href="/unsubscribe_from_list" style="color:#fff">Unsubscribe</a> | <a href="/page/contactus" style="color:#fff">Contact</a>
<a href="/unsubscribe_from_list" style="color:#fff">Unsubscribe</a>
<t t-if="website"> | <a href="/page/contactus" style="color:#fff">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -676,12 +677,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:20px;text-align:center">
&amp;nbsp;
<a href="/page/contactus" style="color:#fff">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="color:#fff">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="color:#fff">Twitter</a> |
<t t-if="website">
<a href="/page/contactus" style="color:#fff">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="color:#fff">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="color:#fff">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#fff">Unsubscribe</a>
&amp;nbsp;
@@ -10,7 +10,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -28,7 +28,7 @@
<tr>
<td style="font-size: 30px; text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#414141">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#414141">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -45,13 +45,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -62,21 +62,21 @@
</t>
<t t-if="website.social_googleplus">
<td align="right" style="padding-left:5px">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color:#44B7B7;" class="fa fa-google-plus-square fa-2x"></span>
</a>
</td>
</t>
<t t-if="website.social_linkedin">
<td align="right" style="padding-left:5px">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_linkedin">
<span style="color:#44B7B7;" class="fa fa-linkedin-square fa-2x"></span>
</a>
</td>
</t>
<t t-if="website.social_twitter">
<td align="right" style="padding-left:5px">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color:#44B7B7;" class="fa fa-twitter-square fa-2x"></span>
</a>
</td>
@@ -95,13 +95,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #414141;font-size: 30px; text-align:center">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #414141;font-size: 30px; text-align:center">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -112,21 +112,21 @@
</t>
<t t-if="website.social_googleplus">
<td align="right" style="padding-left:5px">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color:#44B7B7;" class="fa fa-google-plus-square fa-2x"></span>
</a>
</td>
</t>
<t t-if="website.social_linkedin">
<td align="right" style="padding-left:5px">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_linkedin">
<span style="color:#44B7B7;" class="fa fa-linkedin-square fa-2x"></span>
</a>
</td>
</t>
<t t-if="website.social_twitter">
<td align="right" style="padding-left:5px">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color:#44B7B7;" class="fa fa-twitter-square fa-2x"></span>
</a>
</td>
@@ -246,7 +246,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -256,14 +256,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -450,7 +450,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;inherit;border-collapse:collapse;color:inherit">
<tr>
<td style="padding:10px 30px;font-size:14px;line-height:20px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -570,7 +570,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="neopolitan o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="neopolitan o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #414141 repeat top /100%;color:#44B7B7">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:100%;border-collapse:collapse;color:inherit;color:inherit">
@@ -621,7 +621,9 @@
<tr>
<td style="font-size:12px;text-align:center;padding-top:10px;color:#44B7B7;padding-bottom:5px">
&amp;nbsp;
<a href="/unsubscribe_from_list" style="color:#44B7B7">Unsubscribe</a> | <a href="/page/contactus" style="color:#44B7B7">Contact</a>&amp;nbsp;
<a href="/unsubscribe_from_list" style="color:#44B7B7">Unsubscribe</a>
<t t-if="website"> | <a href="/page/contactus" style="color:#44B7B7">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
<tr>
@@ -642,12 +644,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:10px;text-align:center">
&amp;nbsp;
<a href="/page/contactus" style="color:#44B7B7">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="color:#44B7B7">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="color:#44B7B7">Twitter</a> |
<t t-if="website">
<a href="/page/contactus" style="color:#44B7B7">Contact Us</a> |
<t t-if="website.social_facebook">
<a t-att-href="website.social_facebook" style="color:#44B7B7">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a t-att-href="website.social_twitter" style="color:#44B7B7">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#44B7B7">Unsubscribe</a>
&amp;nbsp;
@@ -10,7 +10,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -28,7 +28,7 @@
<tr>
<td style="font-size: 30px; text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#37302d">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#37302d">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -45,13 +45,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -95,13 +95,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #37302d;font-size: 30px; text-align:center">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #37302d;font-size: 30px; text-align:center">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -243,7 +243,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -253,14 +253,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -465,7 +465,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;color:inherit">
<tr>
<td style="padding:10px 30px;font-size:14px;line-height:20px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -585,7 +585,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="skyline o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="skyline o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #C2C2C2 repeat top /100%;color:#37302d">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:100%;border-collapse:collapse;color:inherit">
@@ -636,7 +636,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding:10px;color:#37302D">
&amp;nbsp;
<a style="color:#37302D" href="/unsubscribe_from_list">Unsubscribe</a> | <a style="color:#37302D" href="/page/contactus">Contact</a>
<a style="color:#37302D" href="/unsubscribe_from_list">Unsubscribe</a>
<t t-if="website"> | <a style="color:#37302D" href="/page/contactus">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -658,12 +659,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:20px;text-align:center">
&amp;nbsp;
<a style="color:#37302D" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#37302D" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#37302D" t-att-href="website.social_twitter">Twitter</a> |
<t t-if="website">
<a style="color:#37302D" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#37302D" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#37302D" t-att-href="website.social_twitter">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#37302D">Unsubscribe</a>
&amp;nbsp;
@@ -10,7 +10,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -28,7 +28,7 @@
<tr>
<td style="font-size: 30px; text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #414141">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #414141">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -45,13 +45,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px;width:200px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -95,13 +95,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #414141;font-size: 30px; text-align:center">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #414141;font-size: 30px; text-align:center">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -246,7 +246,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -256,14 +256,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -466,7 +466,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;color:inherit;border-collapse:collapse">
<tr>
<td style="padding:10px 30px;font-size:14px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -586,7 +586,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="sunday o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="sunday o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #2F2F2F repeat top /100%;color:#EEEEEE">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:100%;border-collapse:collapse;color:inherit">
@@ -637,7 +637,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding:10px;color:#fff">
&amp;nbsp;
<a style="color:#fff" href="/unsubscribe_from_list">Unsubscribe</a> | <a style="color:#fff" href="/page/contactus">Contact</a>
<a style="color:#fff" href="/unsubscribe_from_list">Unsubscribe</a>
<t t-if="website"> | <a style="color:#fff" href="/page/contactus">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -659,12 +660,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:20px;text-align:center">
&amp;nbsp;
<a style="color:#fff" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#fff" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#fff" t-att-href="website.social_twitter">Twitter</a> |
<t t-if="website">
<a style="color:#fff" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#fff" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#fff" t-att-href="website.social_twitter">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#fff">Unsubscribe</a>
&amp;nbsp;
@@ -10,7 +10,7 @@
<tr>
<td valign="center" style="text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px" alt="Your Logo" />
</a>
&amp;nbsp;
@@ -28,7 +28,7 @@
<tr>
<td style="font-web_editor/font_to_img: 30px; text-align:center">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color:#008000">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color:#008000">
<strong>Your Company</strong>
</a>
&amp;nbsp;
@@ -45,13 +45,13 @@
<tr>
<td valign="center" width="270" style="padding:10px 10px 10px 5px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none">
<img src="/logo.png" style="padding:10px;height:auto;max-width:600px" alt="Your Logo" />
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -95,13 +95,13 @@
<tr>
<td valign="center" width="270" style="padding-left:5px;font-size:30px">
&amp;nbsp;
<a t-att-href="(website.company_id.website) or '#'" style="text-decoration:none;color: #008000">
<a t-att-href="(company_id.website) or '#'" style="text-decoration:none;color: #008000">
<strong>Your Company</strong>
</a>
&amp;nbsp;
</td>
<td valign="center" width="270" style="padding:10px 15px 10px 10px;vertical-align:middle">
<table border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<table t-if="website" border="0" cellpadding="0" cellspacing="0" align="right" style="border-collapse:collapse">
<tr>
<t t-if="website.social_facebook">
<td align="right">
@@ -249,7 +249,7 @@
</ul>
</td>
<td style="width: 60px;vertical-align:middle;display: table-cell">
<ul style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<ul t-if="website" style="border-left:1px solid #e6e6e6;list-style-type:none;padding-left:16px">
<t t-if="website.social_facebook">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
@@ -259,14 +259,14 @@
</t>
<t t-if="website.social_twitter">
<li style="width:34%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_twitter">
<span style="color: rgb(75,110,168);" class="fa fa-twitter-square fa-2x"></span>
</a>
</li>
</t>
<t t-if="website.social_googleplus">
<li style="width:33%;margin-left:0">
<a t-att-href="website.social_facebook">
<a t-att-href="website.social_googleplus">
<span style="color: rgb(221,75,57);" class="fa fa-google-plus-square fa-2x"></span>
</a>
</li>
@@ -486,7 +486,7 @@
<table style="width:100%;text-align:justify;margin:0 auto;color:#414141;border-collapse:collapse">
<tr>
<td style="padding:10px 30px;font-size:14px">
<p style="margin:0">Dear John</p>
<p style="margin:0">Dear ${object.name}</p>
<p style="margin:0">Great stories have personality. Consider telling a great story that provides personality. Writing a story with personality for potential clients will assist with making a relationship connection. This shows up in small quirks like word choices or phrases. Write from your point of view, not from someone else's experience.<br/></p>
<p style="margin:0">Great stories are for everyone even when only written for just one person. If you try to write with a wide general audience in mind, your story will ring false and be bland. No one will be interested. Write for one person. If it’s genuine for the one, it’s genuine for the rest.</p>
<p style="margin:0">Kind Regards,</p>
@@ -606,7 +606,7 @@
</xpath>
<xpath expr="//div[@id='email_designer_default_footer']/div[2]" position="inside">
<div name="Social + Text" class="zenflat o_mail_block_footer_social">
<div t-if="website" name="Social + Text" class="zenflat o_mail_block_footer_social">
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #EEEEEE repeat top /100%;color:#414141">
<div style="padding:10px">
<table cellspacing="0" cellpadding="0" style="margin: 0 auto;width:600px;border-collapse:collapse">
@@ -657,7 +657,8 @@
<tr>
<td style="font-size:12px;text-align:center;padding-top:10px;padding-bottom:5px;color:#414141">
&amp;nbsp;
<a style="color:#414141" href="/unsubscribe_from_list">Unsubscribe</a> | <a style="color:#414141" href="/page/contactus">Contact</a>
<a style="color:#414141" href="/unsubscribe_from_list">Unsubscribe</a>
<t t-if="website"> | <a style="color:#414141" href="/page/contactus">Contact</a> </t>
&amp;nbsp;
</td>
</tr>
@@ -679,12 +680,14 @@
<tr>
<td valign="middle" align="right" style="font-size:12px;padding:20px;text-align:center">
&amp;nbsp;
<a style="color:#414141" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#414141" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#414141" t-att-href="website.social_twitter">Twitter</a> |
<t t-if="website">
<a style="color:#414141" href="/page/contactus">Contact Us</a> |
<t t-if="website.social_facebook">
<a style="color:#414141" t-att-href="website.social_facebook">Facebook</a> |
</t>
<t t-if="website.social_twitter">
<a style="color:#414141" t-att-href="website.social_twitter">Twitter</a> |
</t>
</t>
<a href="/unsubscribe_from_list" style="color:#414141">Unsubscribe</a>
&amp;nbsp;
+1 -2
View File
@@ -1,3 +1,2 @@
# -*- coding: utf-8 -*-
import models
import controller
import controller
+3 -4
View File
@@ -2,14 +2,13 @@
'name': 'Link Tracker',
'category': 'Hidden',
'description': """
Create short and trackable URLs.
Website interface to create short and trackable URLs.
=====================================================
""",
'version': '1.0',
'depends':['website','marketing', 'utm'],
'data' : [
'views/website_links.xml',
'depends': ['website', 'marketing', 'link_tracker'],
'data': [
'views/website_links_template.xml',
'views/website_links_graphs.xml',
'security/ir.model.access.csv',
+6 -12
View File
@@ -10,7 +10,7 @@ class Website_Url(http.Controller):
def create_shorten_url(self, **post):
if 'url' not in post or post['url'] == '':
return {'error': 'empty_url'}
return request.env['website.links'].create(post).read()
return request.env['link.tracker'].create(post).read()
@http.route('/r', type='http', auth='user', website=True)
def shorten_url(self, **post):
@@ -18,28 +18,22 @@ class Website_Url(http.Controller):
@http.route('/website_links/add_code', type='json', auth='user')
def add_code(self, **post):
link_id = request.env['website.links.code'].search([('code', '=', post['init_code'])], limit=1).link_id.id
new_code = request.env['website.links.code'].search_count([('code', '=', post['new_code']), ('link_id', '=', link_id)])
link_id = request.env['link.tracker.code'].search([('code', '=', post['init_code'])], limit=1).link_id.id
new_code = request.env['link.tracker.code'].search_count([('code', '=', post['new_code']), ('link_id', '=', link_id)])
if new_code > 0:
return new_code.read()
else:
return request.env['website.links.code'].create({'code': post['new_code'], 'link_id': link_id})[0].read()
return request.env['link.tracker.code'].create({'code': post['new_code'], 'link_id': link_id})[0].read()
@http.route('/website_links/recent_links', type='json', auth='user')
def recent_links(self, **post):
return request.env['website.links'].recent_links(post['filter'], post['limit'])
return request.env['link.tracker'].recent_links(post['filter'], post['limit'])
@http.route('/r/<string:code>+', type='http', auth="user", website=True)
def statistics_shorten_url(self, code, **post):
code = request.env['website.links.code'].search([('code', '=', code)], limit=1)
code = request.env['link.tracker.code'].search([('code', '=', code)], limit=1)
if code:
return request.website.render("website_links.graphs", code.link_id.read()[0])
else:
return werkzeug.utils.redirect('', 301)
@http.route('/r/<string:code>', type='http', auth='none', website=True)
def full_url_redirect(self, code, **post):
request.env['website.links.click'].add_click(code, request.httprequest.remote_addr, request.session['geoip'].get('country_code'), stat_id=False)
redirect_url = request.env['website.links'].get_url_from_code(code)
return werkzeug.utils.redirect(redirect_url or '', 301)
@@ -1,10 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_website_links_user,website.links,model_website_links,base.group_user,1,0,0,0
access_website_links_manager,website.links,model_website_links,base.group_website_designer,1,1,1,1
access_website_links_public,website.links,model_website_links,base.group_public,1,0,0,0
access_website_links_code_user,website.links.code,model_website_links_code,base.group_user,1,0,0,0
access_website_links_code_manager,website.links.code,model_website_links_code,base.group_website_designer,1,1,1,1
access_website_links_code_public,website.links.code,model_website_links_code,base.group_public,1,0,0,0
access_website_links_click_user,website.links.click,model_website_links_click,base.group_user,1,0,0,0
access_website_links_click_manager,website.links.click,model_website_links_click,base.group_website_designer,1,1,1,1
access_website_links_click_public,website.links.click,model_website_links_click,base.group_public,1,0,0,0
access_link_tracker_manager,link.tracker,link_tracker.model_link_tracker,base.group_website_designer,1,1,1,1
access_link_tracker_code_manager,link.tracker.code,link_tracker.model_link_tracker_code,base.group_website_designer,1,1,1,1
access_link_tracker_click_manager,link.tracker.click,link_tracker.model_link_tracker_click,base.group_website_designer,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_website_links_user access_link_tracker_manager website.links link.tracker model_website_links link_tracker.model_link_tracker base.group_user base.group_website_designer 1 0 1 0 1 0 1
3 access_website_links_manager access_link_tracker_code_manager website.links link.tracker.code model_website_links link_tracker.model_link_tracker_code base.group_website_designer 1 1 1 1
4 access_website_links_public access_link_tracker_click_manager website.links link.tracker.click model_website_links link_tracker.model_link_tracker_click base.group_public base.group_website_designer 1 0 1 0 1 0 1
access_website_links_code_user website.links.code model_website_links_code base.group_user 1 0 0 0
access_website_links_code_manager website.links.code model_website_links_code base.group_website_designer 1 1 1 1
access_website_links_code_public website.links.code model_website_links_code base.group_public 1 0 0 0
access_website_links_click_user website.links.click model_website_links_click base.group_user 1 0 0 0
access_website_links_click_manager website.links.click model_website_links_click base.group_website_designer 1 1 1 1
access_website_links_click_public website.links.click model_website_links_click base.group_public 1 0 0 0
@@ -131,7 +131,7 @@ website.if_dom_contains('div.o_website_links_chart', function() {
// Get the code of the link
var link_id = $('#link_id').val();
var clicks = new Model('website.links.click');
var clicks = new Model('link.tracker.click');
var links_domain = ['link_id', '=', parseInt(link_id)];
var total_clicks = function() {
+3
View File
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
import controllers
@@ -0,0 +1,16 @@
{
'name': 'Website Mass Mailing Campaigns',
'description': """
Add a snippet in the website builder to subscribe a mass_mailing list
""",
'version': '1.0',
'author': 'Odoo',
'category': 'Hidden',
'depends': ['website', 'mass_mailing'],
'data': [
'views/website_mass_mailing.xml',
'views/unsubscribe.xml',
'views/snippets.xml',
],
'auto_install': True,
}
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
import main
@@ -0,0 +1,72 @@
# -*- coding: utf-8 -*-
from openerp import http, SUPERUSER_ID
from openerp.http import request
class MassMailController(http.Controller):
@http.route(['/mail/mailing/<int:mailing_id>/unsubscribe'], type='http', website=True, auth='none')
def mailing(self, mailing_id, email=None, res_id=None, **post):
mailing = request.env['mail.mass_mailing'].sudo().browse(mailing_id)
if mailing.exists():
if mailing.mailing_model == 'mail.mass_mailing.contact':
contacts = request.env['mail.mass_mailing.contact'].sudo().search([('email', 'ilike', email)])
return request.website.render('mass_mailing.page_unsubscribe', {
'contacts': contacts,
'email': email,
'mailing_id': mailing_id})
else:
mailing.update_opt_out(mailing_id, email, [res_id], True)
return request.website.render('mass_mailing.page_unsubscribed')
@http.route(['/mail/mailing/unsubscribe'], type='json', auth='none')
def unsubscribe(self, mailing_id, opt_in_ids, opt_out_ids, email):
mailing = request.env['mail.mass_mailing'].sudo().browse(mailing_id)
if mailing.exists():
mailing.update_opt_out(mailing_id, email, opt_in_ids, False)
mailing.update_opt_out(mailing_id, email, opt_out_ids, True)
@http.route('/website_mass_mailing/is_subscriber', type='json', website=True, auth="public")
def is_subscriber(self, list_id, **post):
cr, uid, context = request.cr, request.uid, request.context
Contacts = request.registry['mail.mass_mailing.contact']
Users = request.registry['res.users']
is_subscriber = False
email = None
if uid != request.website.user_id.id:
email = Users.browse(cr, SUPERUSER_ID, uid, context).email
elif request.session.get('mass_mailing_email'):
email = request.session['mass_mailing_email']
if email:
contact_ids = Contacts.search(cr, SUPERUSER_ID, [('list_id', '=', int(list_id)), ('email', '=', email), ('opt_out', '=', False)], context=context)
is_subscriber = len(contact_ids) > 0
return {'is_subscriber': is_subscriber, 'email': email}
@http.route('/website_mass_mailing/subscribe', type='json', website=True, auth="public")
def subscribe(self, list_id, email, **post):
cr, uid, context = request.cr, request.uid, request.context
Contacts = request.registry['mail.mass_mailing.contact']
contact_ids = Contacts.search_read(cr, SUPERUSER_ID, [('list_id', '=', int(list_id)), ('email', '=', email)], ['opt_out'], context=context)
if not contact_ids:
Contacts.add_to_list(cr, SUPERUSER_ID, email, int(list_id), context=context)
else:
if contact_ids[0]['opt_out']:
Contacts.write(cr, SUPERUSER_ID, [contact_ids[0]['id']], {'opt_out': False}, context=context)
# add email to session
request.session['mass_mailing_email'] = email
return True
@http.route(['/website_mass_mailing/get_content'], type='json', website=True, auth="public")
def get_mass_mailing_content(self, newsletter_id, **post):
data = self.is_subscriber(newsletter_id, **post)
mass_mailing_list = request.registry['mail.mass_mailing.list'].browse(request.cr, SUPERUSER_ID, int(newsletter_id), request.context)
data.update({
'content': mass_mailing_list.popup_content,
'redirect_url': mass_mailing_list.popup_redirect_url
})
return data
@@ -59,13 +59,13 @@
<template id="page_unsubscribe" name="Unsubscribe">
<t t-call="website.layout">
<t t-call="mass_mailing.unsubscribe"/>
<t t-call="website_mass_mailing.unsubscribe"/>
</t>
</template>
<template id="page_unsubscribed" name="Unsubscribed">
<t t-call="website.layout">
<t t-call="mass_mailing.unsubscribed"/>
<t t-call="website_mass_mailing.unsubscribed"/>
</t>
</template>
</data>
@@ -4,13 +4,13 @@
<template id="assets_frontend" inherit_id="website.assets_frontend" name="Mail Frontend Assets">
<xpath expr="." position="inside">
<script type="text/javascript" src="/mass_mailing/static/src/js/website_mass_mailing.js"></script>
<script type="text/javascript" src="/website_mass_mailing/static/src/js/website_mass_mailing.js"></script>
</xpath>
</template>
<template id="assets_editor" inherit_id="website.assets_editor" name="wesbite_mass_mailing Editor assets">
<xpath expr="/t" position="inside">
<script type="text/javascript" src="/mass_mailing/static/src/js/website_mass_mailing.editor.js" groups="base.group_website_publisher"></script>
<script type="text/javascript" src="/website_mass_mailing/static/src/js/website_mass_mailing.editor.js" groups="base.group_website_publisher"></script>
</xpath>
</template>