mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
@@ -13,7 +13,11 @@ class PortalRma(CustomerPortal):
|
||||
|
||||
def _prepare_portal_layout_values(self):
|
||||
values = super()._prepare_portal_layout_values()
|
||||
values['rma_count'] = request.env['rma'].search_count([])
|
||||
if request.env['rma'].check_access_rights(
|
||||
'read', raise_exception=False):
|
||||
values['rma_count'] = request.env['rma'].search_count([])
|
||||
else:
|
||||
values['rma_count'] = 0
|
||||
return values
|
||||
|
||||
def _rma_get_page_view_values(self, rma, access_token, **kwargs):
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<template id="portal_my_home_rma" name="Portal My Home : RMA entries" inherit_id="portal.portal_my_home" priority="30">
|
||||
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
|
||||
<t t-call="portal.portal_docs_entry">
|
||||
<t t-call="portal.portal_docs_entry" t-if="rma_count">
|
||||
<t t-set="title">RMA Orders</t>
|
||||
<t t-set="url" t-value="'/my/rmas'"/>
|
||||
<t t-set="count" t-value="rma_count"/>
|
||||
|
||||
Reference in New Issue
Block a user