Skip to content

Commit

Permalink
[MIG] website_membership_gamification: Migration to version 17.0
Browse files Browse the repository at this point in the history
TT51559
  • Loading branch information
pilarvargas-tecnativa committed Nov 27, 2024
1 parent c88083b commit b609b07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion website_membership_gamification/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "Website Membership Gamification",
"summary": "Show badges assigned to users on website",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"category": "Website",
"author": "Sygel, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/vertical-association",
Expand Down
7 changes: 2 additions & 5 deletions website_membership_gamification/views/res_partner_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page
string="Badges"
attrs="{'invisible': [('has_related_users', '=', False)]}"
>
<page string="Badges" invisible="not has_related_users">
<field name="has_related_users" invisible="1" />
<button
string="Grant a Badge"
type="object"
class="btn btn-secondary"
class="btn btn-secondary mb-4"
name="action_grant_badge_wizard"
/>
<field name="gamification_badge_ids" mode="kanban" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
id="website_membership_gamification_partner_detail"
inherit_id="website_partner.partner_detail"
>
<xpath expr="//address" position="after">
<div class="text-center" t-if="partner.gamification_badge_ids">
<xpath expr="//div" position="after">
<div class="row text-center" t-if="partner.gamification_badge_ids">
<t
t-foreach="partner.gamification_badge_ids.badge_id.filtered(lambda a: a.website_member_published and (not a.website_expiration_date or a.website_expiration_date >= datetime.date.today()))"
t-as="badge"
Expand Down

0 comments on commit b609b07

Please sign in to comment.