Purpose ======= Some users found a way to farm karma points, so we want to be able to track the source of the karma gain / loss. Specifications ============== Now, we added a reference field `origin_ref` which store the record responsible for the karma gain / loss (e.g. a slide we just completed). In addition to this origin, we also have a new field to store the reason (e.g. "Slide completed") so we know exactly what happened and how the user gains his karma. Before, the `old_value` of the karma tracking has to be set manually, but now it's done automatically based on the value of the previous tracking of the same user. That way, it will simplify other part of the code. Add the karma reason in the website modules. Adapt those modules due to the changes in gamification. Task-2234179 closes odoo/odoo#76430 Related: odoo/enterprise#23702 Related: odoo/upgrade#3299 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com> Co-authored-by: std-odoo <std@odoo.com>
17 lines
837 B
XML
17 lines
837 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="gamification_karma_tracking_view_search" model="ir.ui.view">
|
|
<field name="name">gamification.karma.tracking.view.search.inherit.website.slides</field>
|
|
<field name="model">gamification.karma.tracking</field>
|
|
<field name="inherit_id" ref="gamification.gamification_karma_tracking_view_search"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//filter[@name='filter_res_users']" position='after'>
|
|
<filter string="Course" name="filter_slide_channel"
|
|
domain="[('origin_ref', 'ilike', 'slide.channel,')]"/>
|
|
<filter string="Quiz" name="filter_slide_slide"
|
|
domain="[('origin_ref', 'ilike', 'slide.slide,')]"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|