diff options
| author | Yannick Tivisse <yti@odoo.com> | 2015-11-24 13:32:00 +0100 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2015-11-24 18:50:28 +0100 |
| commit | 23a4adc1995174347df30208dff9f0426d6444bf (patch) | |
| tree | 0bf473e55e8c471dcc5efd7d715b500da4a2e8f2 | |
| parent | 56cec604e6313c49582bbd9801686328696b2675 (diff) | |
[ADD] project,crm,website_mail: Email template to send on email installation
| -rw-r--r-- | addons/crm/__openerp__.py | 1 | ||||
| -rw-r--r-- | addons/crm/crm_mail_template_data.xml | 122 | ||||
| -rw-r--r-- | addons/project/__openerp__.py | 1 | ||||
| -rw-r--r-- | addons/project/project_data.xml | 1 | ||||
| -rw-r--r-- | addons/project/project_mail_template_data.xml | 123 | ||||
| -rw-r--r-- | addons/web_planner/models/web_planner.py | 4 | ||||
| -rw-r--r-- | addons/website_mail/data/mail_channels.xml | 123 |
7 files changed, 375 insertions, 0 deletions
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index b45915b06b8..271422a60dd 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -76,6 +76,7 @@ Dashboard for CRM will include: 'views/crm.xml', 'web_planner_data.xml', 'sales_team_dashboard.xml', + 'crm_mail_template_data.xml' ], 'demo': [ 'data/crm_stage_demo.xml', diff --git a/addons/crm/crm_mail_template_data.xml b/addons/crm/crm_mail_template_data.xml new file mode 100644 index 00000000000..a273d7fc419 --- /dev/null +++ b/addons/crm/crm_mail_template_data.xml @@ -0,0 +1,122 @@ +<odoo> + <data noupdate="1"> + <!-- notify to admin of module installation --> + <record id="mail_template_data_module_install_crm" model="mail.template"> + <field name="name">Email send after crm installation.</field> + <field name="subject">Your Odoo CRM application is running smoothly.</field> + <field name="email_from">help@odoo.com</field> + <field name="email_to">${user.email|safe}</field> + <field name="lang">${user.lang}</field> + <field name="model_id" ref="base.model_ir_module_module"/> + <field name="auto_delete" eval="True"/> + <field name="scheduled_date">${(datetime.datetime.now() + relativedelta(days=2)).strftime('%Y-%m-%d %H:%M')}</field> + <field name="body_html" ><![CDATA[ + % set last_created_team = user.env['crm.team'].search([], order="create_date desc")[0] + + <div style="margin: 10px auto;"> + <table cellspacing="0" cellpadding="0" style="width:100%;"> + <tbody> + <tr> + <td style="padding:2px;width:30%;"> + <img src="web/static/src/img/logo.png"/> + </td> + <td style="vertical-align: top; padding: 8px 10px;text-align: left;font-size: 14px;"> + <a href="web/login" style="float:right ;margin:15px auto;background: #a24689;border-radius: 5px;color: #ffffff;font-size: 16px;padding: 10px 20px 10px 20px;text-decoration: none;">Auto Login</a> + </td> + </tr> + </tbody> + </table> + <table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;border-top:1px solid lightgray""> + <tbody> + <tr> + <td style="padding:15px 10px;font-size:20px"> + <p style="color:#a24689;margin:0" >Hooray!</p><br> + <p dir="ltr" style="font-size:15px;margin-top:0pt;margin-bottom:0pt;"> + <span>Your Odoo CRM application is up and running</span></p><br> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span style="font-size:13px;font-weight:bold; ">What’s next?</span></p> + <ul style="margin-top:0pt;margin-bottom:0pt;font-size:13px;list-style-type:disc;"> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Try creating a lead by sending an email to </span> + <a href="mailto:${last_created_team.alias_id.name_get()[0][1] if last_created_team.alias_id.alias_domain else user.company_id.email}"> + <span style="font-weight:bold; text-decoration:underline;">${last_created_team.alias_id.name_get()[0][1] if last_created_team.alias_id.alias_domain else user.company_id.email}</span> + </a> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span>Track your opportunities in your sale funnel by simply dragging and dropping the cards from one column to another</span> + </p> + </li> + </ul> <br> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"> + <span style="font-weight:bold;">Discover the </span> + <span><a href="/web#view_type=list&model=crm.lead&action=crm.crm_lead_all_leads"> + <span style="font-weight:bold; text-decoration:underline;">CRM planner</span></a></span> + <span> to activate extra features</span> + <span style="color:#a24689;margin:0;font-weight:bold">(${user.env['web.planner'].get_planner_progress('planner_crm')}% done)</span> + </p> + <ul style="margin-top:0pt;margin-bottom:0pt;font-size:13px;list-style-type:disc;"> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Automatically assign your leads to your salesmen with the lead scoring, </span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Keep in touch with your potential client with efficient email campaigns,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Gain high quality insight from surveys,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Get smart reporting and accurate dashboards,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span>And much more...</span> + </p> + </li> + </ul> + <br> + <p dir="ltr" style="font-size:13px;line-height:1.3;margin-top:0pt;margin-bottom:8pt;"> + <span style="font-weight:bold;">Need Help?</span> + <span style="font-style:italic;">You’re not alone</span> + </p> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"> + <span>We would be delighted to assist you along the way. Contact us at + <a href="mailto:support@odoo.com"><span style="text-decoration:underline;"> + help@odoo.com</span></a> if you have any question. You can also discover + how to get the best out of Odoo CRM with our </span> + <a href="https://www.odoo.com/documentation/user/9.0/crm.html"> + <span style="text-decoration:underline;">User Documentation</span></a> + </span><span> or with our </span> + <a href="https://www.odoo.com/documentation/9.0/"> + <span style="text-decoration:underline;">API Documentation</span></a> + </p> + <br> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"><span>Enjoy your Odoo experience,</span></p> + </td> + </tr> + </tbody> + </table> + <div dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;color:grey"> + <span><br/>-- <br/>The Odoo Team<br/>PS: People love Odoo, check </span><a href="https://twitter.com/odoo/favorites"><span style="text-decoration:underline;">what they say about it.</span></a></span> + </div> + </div>]]></field> + </record> + + <function + id="mail_template_function_module_install_crm" + model="mail.template" + name="send_mail" + eval="[ref('mail_template_data_module_install_crm'), ref('base.module_crm')]"/> + + </data> +</odoo>
\ No newline at end of file diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py index 7c022385cb0..c463f2e50d1 100644 --- a/addons/project/__openerp__.py +++ b/addons/project/__openerp__.py @@ -47,6 +47,7 @@ Dashboard / Reports for Project Management will include: 'project_tip_data.xml', 'project_dashboard.xml', 'web_planner_data.xml', + 'project_mail_template_data.xml', ], 'qweb': ['static/src/xml/project.xml'], 'demo': ['project_demo.xml'], diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml index c1d87077064..a10931c50e5 100644 --- a/addons/project/project_data.xml +++ b/addons/project/project_data.xml @@ -331,4 +331,5 @@ </record> </data> + </openerp> diff --git a/addons/project/project_mail_template_data.xml b/addons/project/project_mail_template_data.xml new file mode 100644 index 00000000000..04f6db49c4e --- /dev/null +++ b/addons/project/project_mail_template_data.xml @@ -0,0 +1,123 @@ +<odoo> + <data noupdate="1"> + <!-- notify to admin of module installation --> + <record id="mail_template_data_module_install_project" model="mail.template"> + <field name="name">project module install then send email</field> + <field name="subject">Your Odoo Project application is up and running</field> + <field name="email_from">help@odoo.com</field> + <field name="email_to">${user.email|safe}</field> + <field name="lang">${user.lang}</field> + <field name="model_id" ref="base.model_ir_module_module"/> + <field name="auto_delete" eval="True"/> + <field name="scheduled_date">${(datetime.datetime.now() + relativedelta(days=3)).strftime('%Y-%m-%d %H:%M')}</field> + <field name="body_html" ><![CDATA[ + % set last_created_project = user.env['project.project'].search([], order="create_date desc")[0] + + <div style="margin: 10px auto;"> + <table cellspacing="0" cellpadding="0" style="width:100%;"> + <tbody> + <tr> + <td style="padding:2px;width:30%;"> + <img src="web/static/src/img/logo.png"/> + </td> + <td style="vertical-align: top; padding: 8px 10px;text-align: left;font-size: 14px;"> + <a href="web/login" style="float:right ;margin:15px auto;background: #a24689;border-radius: 5px;color: #ffffff;font-size: 16px;padding: 10px 20px 10px 20px;text-decoration: none;">Auto Login</a> + </td> + </tr> + </tbody> + </table> + <table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;border-top:1px solid lightgray""> + <tbody> + <tr> + <td style="padding:15px 10px;font-size:20px"> + <p style="color:#a24689;margin:0" >Hooray!</p><br> + <p dir="ltr" style="font-size:15px;margin-top:0pt;margin-bottom:0pt;"> + <span>Your Odoo Project application is up and running</span></p><br> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span style="font-size:13px;font-weight:bold;">What’s next?</span></p> + <ul style="margin-top:0pt;margin-bottom:0pt;font-size:13px;list-style-type:disc;"> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Try creating a task by sending an email to </span> + <a href="mailto:${last_created_project.alias_id.name_get()[0][1] if last_created_project.alias_id.alias_domain else user.company_id.email}"> + <span style="font-weight:bold; text-decoration:underline;">${last_created_project.alias_id.name_get()[0][1] if last_created_project.alias_id.alias_domain else user.company_id.email}</span> + </a> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span><a href="/web#view_type=list&model=res.users&action=base.action_res_users"> + <span style="font-weight:bold; text-decoration:underline;">Invite new users</span></a></span> + <span>to collaborate</span> + </p> + </li> + </ul> <br> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"> + <span style="font-weight:bold;">Discover the </span> + <span><a href="/web#view_type=kanban&model=project.project&action=project.open_view_project_all"> + <span style="font-weight:bold; text-decoration:underline;">project planner</span></a></span> + <span> to activate extra features</span> + <span style="color:#a24689;margin:0;font-weight:bold">(${user.env['web.planner'].get_planner_progress('planner_project')}% done)</span> + </p> + <ul style="margin-top:0pt;margin-bottom:0pt;font-size:13px;list-style-type:disc;"> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Track hours with timesheets,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Plan tasks and resources with forecasts,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Get smart reporting and accurate dashboards,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Bill time on tasks or issues,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span>And much more...</span> + </p> + </li> + </ul> + <br> + <p dir="ltr" style="font-size:13px;line-height:1.3;margin-top:0pt;margin-bottom:8pt;"> + <span style="font-weight:bold;">Need Help?</span> + <span style="font-style:italic;">You’re not alone</span> + </p> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"> + <span>We would be delighted to assist you along the way. Contact us at + <a href="mailto:support@odoo.com"><span style="text-decoration:underline;"> + help@odoo.com</span></a> if you have any question. You can also discover + how to get the best out of Odoo Project with our </span> + <a href="https://www.odoo.com/documentation/user/9.0/project.html"> + <span style="text-decoration:underline;">User Documentation</span></a> + </span><span> or with our </span> + <a href="https://www.odoo.com/documentation/9.0/"> + <span style="text-decoration:underline;">API Documentation</span></a> + </p> + <br> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"><span>Enjoy your Odoo experience,</span></p> + </td> + </tr> + </tbody> + </table> + <div dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;color:grey"> + <span><br/>-- <br/>The Odoo Team<br/>PS: People love Odoo, check </span><a href="https://twitter.com/odoo/favorites"><span style="text-decoration:underline;">what they say about it.</span></a></span> + </div> + </div>]]></field> + </record> + + <function + id="mail_template_function_module_install_project" + model="mail.template" + name="send_mail" + eval="[ref('mail_template_data_module_install_project'), ref('base.module_project')]"/> + </data> +</odoo> diff --git a/addons/web_planner/models/web_planner.py b/addons/web_planner/models/web_planner.py index ff5e692fe55..d96ad31bfe8 100644 --- a/addons/web_planner/models/web_planner.py +++ b/addons/web_planner/models/web_planner.py @@ -70,3 +70,7 @@ class Planner(models.Model): @api.model def is_module_installed(self, module_name=None): return module_name in self.env['ir.module.module']._installed() + + @api.model + def get_planner_progress(self, planner_application): + return self.search([('planner_application', '=', planner_application)]).progress diff --git a/addons/website_mail/data/mail_channels.xml b/addons/website_mail/data/mail_channels.xml index 8ab39125b01..f5d3f10d822 100644 --- a/addons/website_mail/data/mail_channels.xml +++ b/addons/website_mail/data/mail_channels.xml @@ -8,5 +8,128 @@ <field name="description">Public Discussion Group</field> </record> + <!-- notify to admin of module installation --> + <record id="mail_template_data_module_install_website_mail" model="mail.template"> + <field name="name">website module install then send email</field> + <field name="subject">Your business is reachable from anywhere, anytime !</field> + <field name="email_from">help@odoo.com</field> + <field name="email_to">${user.email|safe}</field> + <field name="lang">${user.lang}</field> + <field name="model_id" ref="base.model_ir_module_module"/> + <field name="auto_delete" eval="True"/> + <field name="scheduled_date">${(datetime.datetime.now() + relativedelta(days=1)).strftime('%Y-%m-%d %H:%M')}</field> + <field name="body_html" ><![CDATA[ + <div style="margin: 10px auto;"> + <table cellspacing="0" cellpadding="0" style="width:100%;"> + <tbody> + <tr> + <td style="padding:2px;width:30%;"> + <img src="web/static/src/img/logo.png"/> + </td> + <td style="vertical-align: top; padding: 8px 10px;text-align: left;font-size: 14px;"> + <a href="web/login" style="float:right ;margin:15px auto;background: #a24689;border-radius: 5px;color: #ffffff;font-size: 16px;padding: 10px 20px 10px 20px;text-decoration: none;">Auto Login</a> + </td> + </tr> + </tbody> + </table> + <table style="width:100%;text-align:justify;margin:0 auto;border-collapse:collapse;border-top:1px solid lightgray""> + <tbody> + <tr> + <td style="padding:15px 10px;font-size:20px"> + <p style="color:#a24689;margin:0" >Awesome!</p><br> + <p dir="ltr" style="font-size:15px;margin-top:0pt;margin-bottom:0pt;"> + <span>Your website is now online !</span></p><br> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span style="font-size:13px;font-weight:bold; ">Did you know ?</span></p> + <ul style="margin-top:0pt;margin-bottom:0pt;font-size:13px;list-style-type:disc;"> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Enhance your online business with astonishing apps like : Forum, Blog, e-Commerce, Events, online jobs...</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span>Customize the look of your website with our </span> + <span style="font-weight:bold;text-decoration:underline;"><a href="https://www.odoo.com/apps/themes">magnificent themes</a></span> + <span>to easily create a unique website.</span> + </p> + </li> + </ul> <br> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"> + <span style="font-weight:bold;">Discover the </span> + <span><a href="/web#view_type=kanban&model=project.project&action=project.open_view_project_all"> + <span style="font-weight:bold; text-decoration:underline;">Website planner</span></a></span> + <span> to activate extra features</span> + <span style="color:#a24689;margin:0;font-weight:bold">(${user.env['web.planner'].get_planner_progress('planner_website')}% done)</span> + </p> + <ul style="margin-top:0pt;margin-bottom:0pt;font-size:13px;list-style-type:disc;"> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Grow your traffic by optimizing your referencing with our SEO tool,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Test different versions of a page to perform better in reaching your business objectives,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Improve your conversion from visitor to customer with the Website Live support,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Broaden your audience by translating your website automatically with Gengo,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:0pt;"> + <span>Go further into the customizing with our advanced HTML editor,</span> + </p> + </li> + <li dir="ltr"> + <p dir="ltr" style="margin-top:0pt;margin-bottom:8pt;"> + <span>And much more...</span> + </p> + </li> + </ul> + <br> + <p dir="ltr" style="font-size:13px;line-height:1.3;margin-top:0pt;margin-bottom:8pt;"> + <span style="font-weight:bold;">Need Help?</span> + <span style="font-style:italic;">You’re not alone</span> + </p> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"> + <span>We would be delighted to assist you along the way. Contact us at + <a href="mailto:support@odoo.com"><span style="text-decoration:underline;"> + help@odoo.com</span></a> if you have any question. You can also discover + how to get the best out of Odoo with our </span> + <a href="https://www.odoo.com/documentation/user/9.0/project.html"> + <span style="text-decoration:underline;">User Documentation</span></a> + </span><span> or with our </span> + <a href="https://www.odoo.com/documentation/9.0/"> + <span style="text-decoration:underline;">API Documentation</span></a> + </p> + <br> + <p dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;"><span>Enjoy your Odoo experience,</span></p> + </td> + </tr> + </tbody> + </table> + <div dir="ltr" style="font-size:13px;margin-top:0pt;margin-bottom:8pt;color:grey"> + <span><br/>-- <br/>The Odoo Team<br/>PS: People love Odoo, check </span><a href="https://twitter.com/odoo/favorites"><span style="text-decoration:underline;">what they say about it.</span></a></span> + </div> + </div>]]></field> + </record> + + </data> + + <data noupdate="1"> + <function + id="mail_template_function_module_install_website_mail" + model="mail.template" + name="send_mail" + eval="[ref('mail_template_data_module_install_website_mail'), ref('base.module_website_mail')]"/> </data> + </openerp> |
