diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-06-18 12:03:37 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-07-10 17:00:12 +0200 |
| commit | 05daa152dc19b11a3c9094fb48978d1ba27559b0 (patch) | |
| tree | 5772d02c0e2972388392199721a03cd6079a15a6 /addons/mass_mailing/controllers/web_editor.py | |
| parent | 9665882fbadafbaed0fb56f218c9c74696f71815 (diff) | |
[IMP] mass_mailing: move code from website_mail to mass_mailing and use web_editor
Diffstat (limited to 'addons/mass_mailing/controllers/web_editor.py')
| -rw-r--r-- | addons/mass_mailing/controllers/web_editor.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/addons/mass_mailing/controllers/web_editor.py b/addons/mass_mailing/controllers/web_editor.py new file mode 100644 index 00000000000..f8e3007a5ac --- /dev/null +++ b/addons/mass_mailing/controllers/web_editor.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +from openerp import http +from openerp.http import request +from openerp.addons.web_editor.controllers.main import Web_Editor + + +class Web_Editor(Web_Editor): + + @http.route(["/website_mass_mailing/field/popup_content"], type='http', auth="user") + def mass_mailing_FieldTextHtmlPopupTemplate(self, model=None, res_id=None, field=None, callback=None, **kwargs): + kwargs['snippets'] = '/website/snippets' + kwargs['template'] = 'mass_mailing.FieldTextHtmlPopupContent' + return self.FieldTextHtml(model, res_id, field, callback, **kwargs) + + @http.route('/mass_mailing/field/email_template', type='http', auth="user") + def mass_mailing_FieldTextHtmlEmailTemplate(self, model=None, res_id=None, field=None, callback=None, **kwargs): + kwargs['snippets'] = '/mass_mailing/snippets' + kwargs['template'] = 'mass_mailing.FieldTextHtmlInline' + return self.FieldTextHtmlInline(model, res_id, field, callback, **kwargs) + + @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) |
