diff options
Diffstat (limited to 'addons/digest/data')
| -rw-r--r-- | addons/digest/data/digest_data.xml | 433 | ||||
| -rw-r--r-- | addons/digest/data/digest_tips_data.xml | 75 | ||||
| -rw-r--r-- | addons/digest/data/ir_cron_data.xml | 14 | ||||
| -rw-r--r-- | addons/digest/data/res_config_settings_data.xml | 11 |
4 files changed, 533 insertions, 0 deletions
diff --git a/addons/digest/data/digest_data.xml b/addons/digest/data/digest_data.xml new file mode 100644 index 00000000..5acfbe7e --- /dev/null +++ b/addons/digest/data/digest_data.xml @@ -0,0 +1,433 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo><data noupdate="1"> + + <!-- Email layout: encapsulation when sending (not used in backend display) --> + <template id="digest_mail_layout"> +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="format-detection" content="telephone=no"/> + <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/> + <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" /> + + <style type="text/css"> + body { + margin: 0; + padding: 0; + font-family: Arial, Helvetica, Verdana, sans-serif; + } + #header_background { + background-color: #875a7b; + } + .global_layout { + max-width: 588px; + margin: 0 auto; + border: 1px solid #eeeeee; + border-top: 0; + background-color: #ffffff; + } + .company_name { + display: inline; + vertical-align: middle; + font-weight: bold; + color: #8f8f8f; + } + .title_subtitle { + font-weight: bold; + color: #282f33; + word-break: break-all; + } + .button { + float: right; + background-color: #875a7b; + color: #ffffff; + border-radius: 5px; + } + #button_connect { + text-align: center; + } + .date { + color: #8f8f8f; + } + .tip_title { + margin-top: 0; + font-weight: bold; + } + .tip_content { + margin: 0 auto; + color:#333333; + text-align: justify; + text-justify: inter-word; + } + .illustration_border { + width: 100%; + border: 1px solid grey; + } + .kpi_row_footer { + padding-bottom: 20px; + } + .kpi_header { + overflow: auto; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #eeeeee; + font-size: 15px; + font-weight: bold; + color: #282f33; + } + #button_open_report { + padding: 5px 10px; + font-size: 12px; + font-weight: normal; + } + .kpi_cell { + float: left; + width: 33%; + text-align: center; + } + .kpi_value { + color: #282f33; + font-weight: bold; + text-decoration: none; + } + .kpi_value_label { + display: inline-block; + margin-bottom: 10px; + color: #888888; + font-size: 12px; + text-transform: uppercase; + } + .kpi_margin { + width: 75px; + padding: 5px 10px; + text-decoration: none; + border-radius: 5px; + } + .positive_kpi_margin { + border: 1px solid #c4ecd7; + background-color: #d5f1e2; + color: #17613a; + } + .negative_kpi_margin { + border: 1px solid #f4cfce; + background-color: #f7dddc; + color: #712b29; + } + .kpi_trick { + clear: both; + } + .download_app { + height: 40px; + margin-bottom: 5px; + display: inline-block; + } + .preference_div { + clear: both; + background-color: #eeeeee; + text-align: center; + } + .preference { + margin-bottom: 15px; + color: #6b6d70; + } + .preference a { + text-decoration: none; + } + .by_odoo { + color: #8f8f8f; + } + .odoo_link { + text-decoration: none; + } + .odoo_link_text { + font-weight: bold; + color: #875a7b; + } + .run_business { + color: #2d2a26; + } + #footer { + background-color: #eeeeee; + color: #8f8f8f; + text-align: center; + } + + @media only screen and (max-width: 650px) { + .d-block { + display: block !important; + } + #header_background { + padding-top: 0px; + } + #header { + padding: 15px 20px; + border: 1px solid #eeeeee; + } + .global_layout { + padding: 20px; + } + .company_name { + font-size: 15px; + } + .title_subtitle { + margin: 5px auto; + } + #button_connect { + padding: 4px 10px; + font-size: 12px; + } + .date { + margin-top: 10px; + font-size: 10px; + } + .tip_title { + font-size: 14px; + } + .tip_content { + margin: 10px auto 0 auto; + font-size: 12px; + line-height: 20px; + } + .illustration_border { + margin-top: 15px; + } + .kpi_value { + font-size: 20px; + } + .kpi_margin { + font-size: 10px; + } + .kpi_margin_margin { + margin-bottom: 5px; + } + .preference_div { + padding: 15px; + } + .preference { + font-size: 12px; + } + .by_odoo { + font-size: 10px; + } + .run_business { + margin: 20px auto; + font-size: 12px; + } + #footer { + font-size: 15px; + } + #powered { + margin-top: 15px; + } + .tip_twocol { + overflow: auto; + margin-top: 15px; + } + .tip_twocol_left { + text-align: left; + } + .tip_twocol_img { + width: 90%; + } + } + + @media only screen and (min-width: 651px) { + #header_background { + padding-top: 70px; + } + #header { + padding: 20px 30px 25px 30px; + border-left: 1px solid #875a7b; + border-right: 1px solid #875a7b; + } + .global_layout { + padding: 25px 30px 30px 30px; + } + .company_name { + font-size: 25px; + } + .title_subtitle { + margin: 10px auto; + } + .button { + padding: 5px 10px; + } + #button_connect { + padding: 6px 10px; + font-size: 15px; + } + .date { + margin-top: 15px; + font-size: 12px; + } + .tip_title { + font-size: 20px; + } + .tip_content { + margin: 15px auto 0 auto; + font-size: 15px; + line-height: 25px; + } + .illustration_border { + margin-top: 20px; + } + .kpi_value { + font-size: 30px; + } + .kpi_margin { + font-size: 12px; + } + .kpi_margin_margin { + margin-bottom: 10px; + } + .preference_div { + padding: 20px; + } + .preference { + font-size: 15px; + } + .by_odoo { + font-size: 12px; + } + .run_business { + margin: 15px auto; + font-size: 18px; + } + #footer { + font-size: 20px; + } + #stock_tip { + overflow: auto; + margin-top: 20px; + } + #stock_div_img { + text-align: center; + } + #stock_img { + width: 70%; + } + } + </style> + </head> + <body> + <t t-raw="body"/> + </body> +</html> + </template> + + <!-- DIGEST MAIN TEMPLATE --> + <template id="digest_mail_main"> +<div id="header_background"> + <div class="global_layout" id="header"> + <div style="overflow: auto;"> + <p t-field="company.name" class="company_name" /> + <a t-att-href="top_button_url" target="_blank"><span t-esc="top_button_label" class="button" id="button_connect" /></a> + </div> + <div class="title_subtitle"> + <p t-esc="title" /> + <p t-if="sub_title" t-esc="sub_title" /> + </div> + <div t-esc="formatted_date" class="date" /> + </div> +</div> + +<div style="background-color: #eeeeee;"> +<div t-foreach="tips" t-as="tip" t-raw="tip" class="global_layout" /> + +<div t-if="kpi_data" class="global_layout" style="padding-bottom: 0;"> + <div t-foreach="kpi_data" t-as="kpi_info" class="kpi_row_footer"> + <div t-if="kpi_info.get('kpi_col1') or kpi_info.get('kpi_col2') or kpi_info.get('kpi_col3')"> + <div class="kpi_header"> + <span t-esc="kpi_info['kpi_fullname']" style="vertical-align: middle;" /> + <a t-if="kpi_info['kpi_action']" t-att-href="'/web#action=%s' % kpi_info['kpi_action']"><span class="button" id="button_open_report">Open Report</span></a> + </div> + <div t-if="kpi_info.get('kpi_col1')" class="kpi_cell"> + <div t-call="digest.digest_tool_kpi" > + <t t-set="kpi_value" t-value="kpi_info['kpi_col1']['value']"/> + <t t-set="kpi_margin" t-value="kpi_info['kpi_col1'].get('margin')"/> + <t t-set="kpi_subtitle" t-value="kpi_info['kpi_col1']['col_subtitle']"/> + </div> + </div> + <div t-if="kpi_info.get('kpi_col2')" class="kpi_cell"> + <div t-call="digest.digest_tool_kpi"> + <div t-set="kpi_value" t-value="kpi_info['kpi_col2']['value']"/> + <div t-set="kpi_margin" t-value="kpi_info['kpi_col2'].get('margin')"/> + <div t-set="kpi_subtitle" t-value="kpi_info['kpi_col2']['col_subtitle']"/> + </div> + </div> + <div t-if="kpi_info.get('kpi_col3')" class="kpi_cell"> + <div t-call="digest.digest_tool_kpi"> + <div t-set="kpi_value" t-value="kpi_info['kpi_col3']['value']"/> + <div t-set="kpi_margin" t-value="kpi_info['kpi_col3'].get('margin')"/> + <div t-set="kpi_subtitle" t-value="kpi_info['kpi_col3']['col_subtitle']"/> + </div> + </div> + <div class="kpi_trick" /> + </div> + </div> +</div> + +<div t-if="preferences"> + <div class="global_layout"> + <div class="preference_div"> + <div t-foreach="preferences" t-as="preference" class="preference"> + <t t-raw="preference"/> + </div> + <div class="by_odoo"> + Sent by <a href="https://www.odoo.com" target="_blank" class="odoo_link"><span class="odoo_link_text">Odoo</span></a> – + <a t-att-href="'/web#view_type=form&model=digest.digest&id=%s' % object.id" target="_blank" style="text-decoration: none;"><span style="color: #8f8f8f;">Unsubscribe</span></a> + </div> + </div> + </div> +</div> + +<t t-if="body" t-raw="body"/> +<div t-if="display_mobile_banner" t-call="digest.digest_section_mobile" /> + +<div class="global_layout" id="footer"> + <p style="font-weight: bold;" t-esc="company.name"/> + <p class="by_odoo" id="powered"> + Powered by <a href="https://www.odoo.com" target="_blank" class="odoo_link"><span class="odoo_link_text">Odoo</span></a> + </p> +</div> +</div> + </template> + + + <!-- DIGEST PARTS --> + + <!-- MOBILE BANNER --> + <template id="digest_section_mobile"> +<div class="global_layout" style="overflow: auto;"> + <div style="width: 50%; float: left; text-align: right;"> + <img src="https://www.odoo.com/web/image/24717933/odoo-mobile.png" alt="Odoo Mobile" /> + </div> + <div style="width: 50%; float: left;"> + <p class="run_business">Run your business from anywhere with <b>Odoo Mobile</b>.</p> + <div> + <a href="https://play.google.com/store/apps/details?id=com.odoo.mobile" target="_blank"><img class="download_app" src="https://www.odoo.com/digest/static/src/img/google_play.png" /></a> + </div> + <div> + <a href="https://itunes.apple.com/us/app/odoo/id1272543640" target="_blank"><img class="download_app" src="https://www.odoo.com/digest/static/src/img/app_store.png" /></a> + </div> + </div> +</div> + </template> + + + <!-- DIGEST TOOLS --> + + <!-- KPI DISPLAY --> + <template id="digest_tool_kpi"> +<span t-esc="kpi_value" class="kpi_value" /> +<br/> +<span t-esc="kpi_subtitle" class="kpi_value_label" /> +<div t-if="kpi_margin" class="kpi_margin_margin"> + <span t-if="kpi_margin > 0.0" class="kpi_margin positive_kpi_margin">▲ <t t-esc="'%.2f' % kpi_margin"/> %</span> + <span t-elif="kpi_margin < 0.0" class="kpi_margin negative_kpi_margin">▼ <t t-esc="'%.2f' % kpi_margin"/> %</span> +</div> + </template> + +</data> +</odoo> diff --git a/addons/digest/data/digest_tips_data.xml b/addons/digest/data/digest_tips_data.xml new file mode 100644 index 00000000..1d56e90f --- /dev/null +++ b/addons/digest/data/digest_tips_data.xml @@ -0,0 +1,75 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <data noupdate="1"> + <record id="digest_digest_default" model="digest.digest"> + <field name="name">Your Odoo Periodic Digest</field> + <field name="periodicity">daily</field> + <field name="user_ids" eval="[(4, ref('base.user_admin'))]"/> + <field name="next_run_date" eval="DateTime.now().strftime('%Y-%m-%d')"/> + <field name="kpi_res_users_connected">True</field> + <field name="kpi_mail_message_total">True</field> + </record> + + <record id="digest_tip_digest_0" model="digest.tip"> + <field name="name">Tip: Speed up your workflow with shortcuts</field> + <field name="sequence">800</field> + <field name="group_id" ref="base.group_user" /> + <field name="tip_description" type="html"> +<div> + <p class="tip_title">Tip: Speed up your workflow with shortcuts</p> + <p class="tip_content">Press ALT in any screen to highlight shortcuts for every button in the screen. It is useful to process multiple documents in batch.</p> + <img src="/digest/static/src/img/alt-shortcuts.gif" class="illustration_border" /> +</div> + </field> + </record> + <record id="digest_tip_digest_1" model="digest.tip"> + <field name="name">Tip: Click on an avatar to chat with a user</field> + <field name="sequence">2100</field> + <field name="group_id" ref="base.group_user" /> + <field name="tip_description" type="html"> +<div> + <p class="tip_title">Tip: Click on an avatar to chat with a user</p> + <p class="tip_content">Have a question about a document? Click on the responsible user's picture to start a conversation. If his avatar has a green dot, he is online.</p> + <img src="/digest/static/src/img/avatar.gif" class="illustration_border" /> +</div> + </field> + </record> + <record id="digest_tip_digest_2" model="digest.tip"> + <field name="name">Tip: A calculator in Odoo</field> + <field name="sequence">2300</field> + <field name="group_id" ref="base.group_user" /> + <field name="tip_description" type="html"> +<div> + <p class="tip_title">Tip: A calculator in Odoo</p> + <p class="tip_content">When editing a number, you can use formulae by typing the `=` character. This is useful when computing a margin or a discount on a quotation, sale order or invoice.</p> + <img src="/digest/static/src/img/calculator.gif" class="illustration_border" /> +</div> + </field> + </record> + <record id="digest_tip_digest_3" model="digest.tip"> + <field name="name">Tip: How to ping users in internal notes?</field> + <field name="sequence">2400</field> + <field name="group_id" ref="base.group_user" /> + <field name="tip_description" type="html"> +<div> + <p class="tip_title">Tip: How to ping users in internal notes?</p> + <p class="tip_content">Type "@" to notify someone in a message, or "#" to link to a channel. Try to notify @OdooBot to test the feature.</p> + <img src="/digest/static/src/img/notifications.gif" class="illustration_border" /> +</div> + </field> + </record> + <record id="digest_tip_digest_4" model="digest.tip"> + <field name="name">Tip: Knowledge is power</field> + <field name="sequence">2500</field> + <field name="group_id" ref="base.group_user" /> + <field name="tip_description" type="html"> +<div> + <p class="tip_title">Tip: Knowledge is power</p> + <p class="tip_content">When following documents, use the pencil icon to fine-tune the information you want to receive. +Follow a project / sales team to keep track of this project's tasks / this team's opportunities.</p> + <img src="/digest/static/src/img/following.png" class="illustration_border" /> +</div> + </field> + </record> + </data> +</odoo> diff --git a/addons/digest/data/ir_cron_data.xml b/addons/digest/data/ir_cron_data.xml new file mode 100644 index 00000000..387767bd --- /dev/null +++ b/addons/digest/data/ir_cron_data.xml @@ -0,0 +1,14 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <record forcecreate="True" id="ir_cron_digest_scheduler_action" model="ir.cron"> + <field name="name">Digest Emails</field> + <field name="model_id" ref="model_digest_digest"/> + <field name="state">code</field> + <field name="code">model._cron_send_digest_email()</field> + <field name="user_id" ref="base.user_root"/> + <field name="interval_number">1</field> + <field name="interval_type">days</field> + <field name="numbercall">-1</field> + <field name="nextcall" eval="(DateTime.now() + timedelta(hours=2)).strftime('%Y-%m-%d %H:%M:%S')"/> + </record> +</odoo> diff --git a/addons/digest/data/res_config_settings_data.xml b/addons/digest/data/res_config_settings_data.xml new file mode 100644 index 00000000..cacc318d --- /dev/null +++ b/addons/digest/data/res_config_settings_data.xml @@ -0,0 +1,11 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo noupdate="1"> + <record id="default_emails_digest" model="ir.config_parameter" forcecreate="0"> + <field name="key">digest.default_digest_emails</field> + <field name="value">True</field> + </record> + <record id="default_digest" model="ir.config_parameter" forcecreate="0"> + <field name="key">digest.default_digest_id</field> + <field name="value" ref="digest.digest_digest_default"/> + </record> +</odoo> |
