mirror of
https://github.com/bringout/oca-ocb-vertical-industry.git
synced 2026-04-20 16:51:59 +02:00
19.0 vanilla
This commit is contained in:
parent
4607ccbd2e
commit
825ff6514e
487 changed files with 184979 additions and 195262 deletions
|
|
@ -54,7 +54,7 @@
|
|||
<field name="period">once</field>
|
||||
<field name="visibility_mode">personal</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="user_domain" eval="str([('groups_id.id', '=', ref('base.group_user'))])" />
|
||||
<field name="user_domain" eval="str([('all_group_ids', 'in', [ref('base.group_user')])])" />
|
||||
<field name="state">inprogress</field>
|
||||
<field name="challenge_category">other</field>
|
||||
</record>
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
<field name="period">once</field>
|
||||
<field name="visibility_mode">personal</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="user_domain" eval="str([('groups_id.id', '=', ref('base.group_erp_manager'))])" />
|
||||
<field name="user_domain" eval="str([('all_group_ids', 'in', [ref('base.group_erp_manager')])])" />
|
||||
<field name="state">inprogress</field>
|
||||
<field name="challenge_category">other</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="1">
|
||||
<!--Karma-->
|
||||
<record id="base.user_root" model="res.users">
|
||||
<field name="karma">2500</field>
|
||||
<record id="karma_tracking_user_root" model="gamification.karma.tracking" forcecreate="0">
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="new_value">2500</field>
|
||||
<field name="reason">I am the Root!</field>
|
||||
</record>
|
||||
<record id="base.user_admin" model="res.users">
|
||||
<field name="karma">2500</field>
|
||||
<record id="karma_tracking_user_admin" model="gamification.karma.tracking" forcecreate="0">
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="new_value">2500</field>
|
||||
<field name="reason">I am the Admin!</field>
|
||||
</record>
|
||||
|
||||
<!--Ranks-->
|
||||
|
|
@ -14,8 +18,8 @@
|
|||
<field name="description" type="html"><p>You just began the adventure! Welcome!</p></field>
|
||||
<field name="description_motivational" type="html">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Earn your first points and join the adventure !</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_newbie_badge.svg"/>
|
||||
<div class="flex-grow-1">Earn your first points and join the adventure!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_newbie_badge.svg" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="karma_min">1</field>
|
||||
|
|
@ -28,7 +32,7 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank to show the rest of the world you exist.</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_student_badge.svg"/>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_student_badge.svg" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="karma_min">100</field>
|
||||
|
|
@ -41,7 +45,7 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank to improve your status!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_bachelor_badge.svg"/>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_bachelor_badge.svg" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="karma_min">500</field>
|
||||
|
|
@ -54,7 +58,7 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank and become a Master!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_master_badge.svg"/>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_master_badge.svg" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="karma_min">2000</field>
|
||||
|
|
@ -67,7 +71,7 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank and become a powerful user!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_doctor_badge.svg"/>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_doctor_badge.svg" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
<field name="karma_min">10000</field>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div hidden="true">Reach the next rank to show the rest of the world you exist.</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very nice mug !</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png"/>
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very nice mug!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div hidden="true">Reach the next rank to improve your status!</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very magic wand !</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png"/>
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very magic wand!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -26,8 +26,8 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div hidden="true">Reach the next rank and become a Master!</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very nice hat !</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png"/>
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very nice hat!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
<field name="description_motivational" type="html">
|
||||
<div hidden="true">Reach the next rank and become a powerful user!</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very nice unicorn !</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png"/>
|
||||
<div class="flex-grow-1">Reach the next rank and gain a very nice unicorn!</div>
|
||||
<img class="ms-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png" alt=""/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@
|
|||
<field name="new_value">2500</field>
|
||||
<field name="tracking_date" eval="(DateTime.now()).strftime('%Y-%m-%d')"/>
|
||||
</record>
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field name="karma">2500</field>
|
||||
</record>
|
||||
<function model="gamification.karma.tracking" name="unlink">
|
||||
<value model="gamification.karma.tracking" eval="obj().search([
|
||||
('user_id', '=', ref('base.user_demo')),
|
||||
|
|
@ -74,9 +71,6 @@
|
|||
<field name="new_value">30</field>
|
||||
<field name="tracking_date" eval="DateTime.now()"/>
|
||||
</record>
|
||||
<record id="base.demo_user0" model="res.users">
|
||||
<field name="karma">30</field>
|
||||
</record>
|
||||
<function model="gamification.karma.tracking" name="unlink">
|
||||
<value model="gamification.karma.tracking" eval="obj().search([
|
||||
('user_id', '=', ref('base.demo_user0')),
|
||||
|
|
|
|||
|
|
@ -8,19 +8,16 @@
|
|||
<field name="code">model._cron_update()</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field eval="False" name="doall" />
|
||||
</record>
|
||||
|
||||
<record id="ir_cron_consolidate_last_month" model="ir.cron">
|
||||
<record id="ir_cron_consolidate" model="ir.cron">
|
||||
<field name="name">Gamification: Karma tracking consolidation</field>
|
||||
<field name="model_id" ref="model_gamification_karma_tracking"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model._consolidate_last_month()</field>
|
||||
<field name="code">model._consolidate_cron()</field>
|
||||
<field name="active" eval="True"/>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">months</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="nextcall" eval="(DateTime.now() + relativedelta(day=1, months=1)).strftime('%Y-%m-%d 04:00:00')" />
|
||||
</record>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
<field name="name">Gamification: Badge Received</field>
|
||||
<field name="subject">New badge {{ object.badge_id.name }} granted</field>
|
||||
<field name="model_id" ref="gamification.model_gamification_badge_user"/>
|
||||
<field name="partner_to">{{ object.user_id.partner_id.id }}</field>
|
||||
<field name="partner_to" eval="False"/>
|
||||
<field name="use_default_to" eval="True"/>
|
||||
<field name="description">Sent automatically to the user who received a badge</field>
|
||||
<field name="body_html" type="html">
|
||||
<table border="0" cellpadding="0" style="padding-top: 16px; background-color: #F1F1F1; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
|
||||
|
|
@ -16,47 +17,30 @@
|
|||
<td align="center" style="min-width: 590px;">
|
||||
<table width="590" border="0" cellpadding="0" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;">
|
||||
<tr><td valign="middle">
|
||||
<span style="font-size: 10px;">Your Badge</span><br/>
|
||||
<span style="font-size: 20px; font-weight: bold;" t-out="object.badge_id.name or ''"></span>
|
||||
</td><td valign="middle" align="right">
|
||||
<img t-attf-src="/logo.png?company={{ object.user_id.company_id.id }}" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="object.user_id.company_id.name"/>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" style="text-align:center;">
|
||||
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;"/>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- CONTENT -->
|
||||
<tr>
|
||||
<td align="center" style="min-width: 590px;">
|
||||
<table width="590" border="0" cellpadding="0" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;">
|
||||
<tr><td valign="top" style="font-size: 14px;">
|
||||
<div>Hi <strong><t t-out="object.user_id.name or ''"></t></strong>,</div><br/>
|
||||
<div>You've just been awarded the <strong><t t-out="object.badge_id.name or ''"></t></strong> badge
|
||||
<t t-if="object.sender_id"> by <strong><t t-out="object.sender_id.name or ''"></t></strong>.</t>
|
||||
</div>
|
||||
<table t-if="not is_html_empty(object.badge_id.description)" cellspacing="0" cellpadding="0" border="0" style="width: 560px; margin-top: 5px;">
|
||||
<tbody><tr>
|
||||
<td valign="center">
|
||||
<img t-attf-src="/web/image/gamification.badge/{{ object.badge_id.id }}/image_128/80x80" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="user.company_id.name"/>
|
||||
</td>
|
||||
<td valign="center">
|
||||
<cite t-out="object.badge_id.description or ''"></cite>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
<t t-if="object.comment">
|
||||
<div style="margin-top: 20px; margin-bottom: 20px; padding: 15px; border-radius: 5px; background-color: #fff3cd; border-left: 3px solid #ffe69c;">
|
||||
💬 <strong><t t-out="object.sender_id.name or ''"/> says:</strong>
|
||||
<div style="margin-top: 10px;">
|
||||
"<i><t t-out="object.comment or ''"/></i>"
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<div>
|
||||
Congratulations <t t-out="object.user_id.name or ''"></t> !<br/>
|
||||
You just received badge <strong t-out="object.badge_id.name or ''"></strong> !<br/>
|
||||
<table t-if="not is_html_empty(object.badge_id.description)" cellspacing="0" cellpadding="0" border="0" style="width: 560px; margin-top: 5px;">
|
||||
<tbody><tr>
|
||||
<td valign="center">
|
||||
<img t-attf-src="/web/image/gamification.badge/{{ object.badge_id.id }}/image_128/80x80" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="user.company_id.name"/>
|
||||
</td>
|
||||
<td valign="center">
|
||||
<cite t-out="object.badge_id.description or ''"></cite>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<t t-if="object.sender_id">
|
||||
This badge was granted by <strong t-out="object.sender_id.name or ''"></strong>.
|
||||
</t>
|
||||
<br/>
|
||||
<t t-if="object.comment" t-out="object.comment or ''"></t>
|
||||
<br/><br/>
|
||||
Thank you,
|
||||
<t t-if="object.sender_id.signature">
|
||||
<br />
|
||||
<t t-out="object.sender_id.signature or ''"></t>
|
||||
</t>
|
||||
Thank you for your contributions, and keep shining!
|
||||
</div>
|
||||
</td></tr>
|
||||
<tr><td style="text-align:center;">
|
||||
|
|
@ -91,7 +75,7 @@
|
|||
<tr><td align="center" style="min-width: 590px;">
|
||||
<table width="590" border="0" cellpadding="0" style="min-width: 590px; background-color: #F1F1F1; color: #454748; padding: 8px; border-collapse:separate;">
|
||||
<tr><td style="text-align: center; font-size: 14px;">
|
||||
Powered by <a target="_blank" href="https://www.odoo.com?utm_source=db&utm_medium=gamification" style="color: #875A7B;">Odoo</a>
|
||||
Powered by <a target="_blank" href="https://www.odoo.com?utm_source=db&utm_medium=gamification" t-attf-style="color: {{object.user_id.company_id.email_secondary_color or '#875A7B'}};">Odoo</a>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
|
@ -103,7 +87,8 @@
|
|||
<record id="email_template_goal_reminder" model="mail.template">
|
||||
<field name="name">Gamification: Reminder For Goal Update</field>
|
||||
<field name="model_id" ref="gamification.model_gamification_goal"/>
|
||||
<field name="partner_to">{{ object.user_id.partner_id.id }}</field>
|
||||
<field name="partner_to" eval="False"/>
|
||||
<field name="use_default_to" eval="True"/>
|
||||
<field name="description">Sent automatically to participant who haven't updated their goal</field>
|
||||
<field name="body_html" type="html">
|
||||
<div>
|
||||
|
|
@ -123,6 +108,7 @@
|
|||
<record id="simple_report_template" model="mail.template">
|
||||
<field name="name">Gamification: Challenge Report</field>
|
||||
<field name="model_id" ref="gamification.model_gamification_challenge"/>
|
||||
<field name="use_default_to" eval="False"/>
|
||||
<field name="description">Send a challenge report to all participants</field>
|
||||
<field name="body_html" type="html">
|
||||
<table cellspacing="0" cellpadding="0" width="100%" style="background-color: #EEE; border-collapse: collapse;">
|
||||
|
|
@ -324,10 +310,11 @@
|
|||
<field name="model_id" ref="base.model_res_users"/>
|
||||
<field name="subject">New rank: {{ object.rank_id.name }}</field>
|
||||
<field name="email_to"></field>
|
||||
<field name="partner_to">{{ object.partner_id.id }}</field>
|
||||
<field name="partner_to" eval="False"/>
|
||||
<field name="use_default_to" eval="True"/>
|
||||
<field name="description">Sent automatically when user reaches a new rank</field>
|
||||
<field name="body_html" type="html">
|
||||
<div style="background:#F0F0F0;color:#515166;padding:10px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">
|
||||
<div style="color:#515166;padding:10px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">
|
||||
<table style="width:600px;margin:0px auto;background:white;border:1px solid #e1e1e1;">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
@ -337,17 +324,17 @@
|
|||
<span t-out="object.name or ''">Joel Willis</span>!
|
||||
</p>
|
||||
<p>
|
||||
You just reached a new rank : <strong t-out="object.rank_id.name or ''">Newbie</strong>
|
||||
You just reached a new rank: <strong t-out="object.rank_id.name or ''">Newbie</strong>
|
||||
</p>
|
||||
<t t-if="object.next_rank_id.name">
|
||||
<p>Continue your work to become a <strong t-out="object.next_rank_id.name or ''">Student</strong> !</p>
|
||||
<p>Continue your work to become a <strong t-out="object.next_rank_id.name or ''">Student</strong>!</p>
|
||||
</t>
|
||||
<div style="margin: 16px 0px 16px 0px;">
|
||||
<t t-set="gamification_redirection_data" t-value="object.get_gamification_redirection_data()"/>
|
||||
<t t-foreach="gamification_redirection_data" t-as="data">
|
||||
<t t-set="url" t-value="data['url']"/>
|
||||
<t t-set="label" t-value="data['label']"/>
|
||||
<a t-att-href="url" style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;" t-out="label or ''">LABEL</a>
|
||||
<a t-att-href="url" t-attf-style="background-color: {{object.company_id.email_secondary_color or '#875A7B'}}; padding: 8px 16px 8px 16px; text-decoration: none; color: {{object.company_id.email_primary_color or '#FFFFFF'}}; border-radius: 5px; font-size:13px; display: flex; max-width: fit-content; margin-bottom: 8px;" t-out="label or ''">LABEL</a>
|
||||
</t>
|
||||
</div>
|
||||
</td>
|
||||
|
|
@ -357,9 +344,12 @@
|
|||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="user.signature">
|
||||
<td style="padding:15px 20px 10px 20px;">
|
||||
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
|
||||
<tr>
|
||||
<td t-if="not user.share and user.active" style="padding:15px 20px 10px 20px;">
|
||||
<div>--<br/><t t-out="user.signature or ''">Mitchell Admin</t></div>
|
||||
</td>
|
||||
<td t-else="" style="padding:15px 20px 10px 20px;">
|
||||
<t t-out="user.company_id.name or ''"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue