[MOV]hide_portal_module_by_user: from elabore-addons to ux-tools

This commit is contained in:
2025-12-08 17:44:35 +01:00
parent 85e2b2c1bf
commit 3757d2c584
19 changed files with 672 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<template inherit_id="portal.portal_docs_entry" id="hide_portal_user">
<xpath expr="//a" position="replace">
<t t-if="request.env.user.validate_portal_url(url)">
<a t-att-href="url" t-att-title="title"
class="list-group-item list-group-item-action d-flex align-items-center justify-content-between d-none">
<t t-esc="title" />
<t t-if='count'>
<span class="badge text-bg-secondary rounded-pill" t-esc="count" />
</t>
<t t-elif="placeholder_count">
<span class="badge text-bg-secondary rounded-pill"
t-att-data-placeholder_count="placeholder_count">
<i class="fa fa-spin fa-circle-o-notch"></i>
</span>
</t>
</a>
</t>
</xpath>
</template>
</data>
</odoo>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2026 Munin
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record model="ir.ui.view" id="res_groups_form_view">
<field name="name">res.groups.form (in hide_portal_module_by_user)</field>
<field name="model">res.groups</field>
<field name="inherit_id" ref="base.view_groups_form"/>
<field name="arch" type="xml">
<field name="share" position="after">
<field name="portal_url" readonly="1"
attrs="{'invisible':[('portal_url','=',False)]}"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="res_groups_search_view">
<field name="name">res.groups.search (in hide_portal_module_by_user)</field>
<field name="model">res.groups</field>
<field name="inherit_id" ref="base.view_groups_search"/>
<field name="arch" type="xml">
<field name="share" position="after">
<filter name="portal_group" string="Portal Groups"
domain="[('portal_url','!=',False)]"/>
</field>
</field>
</record>
</odoo>