Skip to content

Commit

Permalink
[IMP] website_sale_credit_point: show available points in website shop
Browse files Browse the repository at this point in the history
  • Loading branch information
leemannd committed Jan 6, 2025
1 parent 291fd2b commit 4213879
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions website_sale_credit_point/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
],
"data": [
"templates/cart.xml",
"templates/navbar_points.xml",
],
}
15 changes: 15 additions & 0 deletions website_sale_credit_point/templates/navbar_points.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" ?>
<odoo>

<template id="navbar_points" inherit_id="website.layout">
<xpath expr="//t[@t-foreach='website.menu_id.child_id']" position="before">
<li t-if="user_id.partner_id" class="nav-item">
<!-- I use an empty <a> tag here to get the styles, used in top menu -->
<span class="nav-link">Credit balance: <span
t-esc="user_id.partner_id.credit_point"
/></span>
</li>
</xpath>
</template>

</odoo>

0 comments on commit 4213879

Please sign in to comment.