[IMP]hide_portal_module_by_user: fix invoices access in v18
This commit is contained in:
@@ -2,9 +2,17 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<template inherit_id="portal.portal_docs_entry" id="hide_portal_user">
|
||||
<xpath expr="//a" position="attributes">
|
||||
<attribute name="t-if">request.env.user.validate_portal_url(url)</attribute>
|
||||
</xpath>
|
||||
<!-- Since 18.0 the entry link is wrapped in a "o_portal_index_card"
|
||||
div, which the portal javascript un-hides once the counters are
|
||||
loaded. The t-if has to be carried by that card, otherwise
|
||||
hiding the link only leaves an empty card in the grid.
|
||||
The card class is dynamic (t-att-class), so hasclass() cannot
|
||||
be used to locate it. -->
|
||||
<xpath expr="//a/.." position="attributes">
|
||||
<!-- config_card entries (Connection & Security) are not
|
||||
document listings and are never group restricted. -->
|
||||
<attribute name="t-if">config_card or request.env.user.validate_portal_url(url)</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user