# How to hide tabs in Tryton without disabling the module or reinstalling all?

**URL:** <https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313>\
**Category:** Developer\
**Created:** [February 16, 2025, 10:28am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313 "2025-02-16T10:28:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahija](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@mahija](https://discuss.tryton.org/u/mahija)\
**Post date:** [February 16, 2025, 10:28am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/1 "2025-02-16T10:28:00Z")

</div>

Hi, I’m using Tryton and have activated a module that adds several tabs in a form view. However, I need to hide these tabs without disabling the module or reinstalling all modules. Since we know we cant disable the module.

I’ve tried looking into XML configurations and access control, but I haven’t found the right solution. What’s the best way to hide specific tabs in Tryton?

![image](https://discuss-cdn.tryton.org/uploads/default/original/2X/e/ecde66d21146b654c89e66aaa4d0d1015bb54c6e.png)

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [February 17, 2025, 8:55am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/2 "2025-02-17T08:55:51Z")

</div>

You can just extend the view and replace the tab by nothing. This will remove the tab directly. You can do it with something like this:

```auto
<xpath expr="/form/notebook/tab[@id='tab_to_replace']" position="replace"/>

```

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [February 17, 2025, 10:04am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/3 "2025-02-17T10:04:26Z")

</div>

Replacing may create troubles if other module relies on the content, so it is probably better to make it invisible with a `states` using [`ModelView.view_attributes`](https://docs.tryton.org/latest/server/ref/models.html#trytond.model.ModelView.view_attributes).

---

<div class="post-metadata">

**Author:** ![mahija](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@mahija](https://discuss.tryton.org/u/mahija)\
**Post date:** [February 18, 2025, 3:15am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/4 "2025-02-18T03:15:18Z")

</div>

I am trying to add a new tab to a form view in Tryton, but I encountered an issue when using `position="replace"` in my XML extension.

I get the following error:

```auto
AttributeError: Couldn't find tag (xpath: //field[@name="rh"]) in parent view!  

```

I also tried using:

```auto
<attribute name="invisible">1</attribute>  

```

But this prevents the tree view from opening the form.

How can I correctly add my tab without causing this issue? Is there a better way to make the field invisible?

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [February 18, 2025, 4:11pm UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/5 "2025-02-18T16:11:02Z")

</div>

> [@mahija](#):
>
> I get the following error:
> 
> ```auto
> AttributeError: Couldn't find tag (xpath: //field[@name="rh"]) in parent view!  
> 
> ```

This error is because there is no field named `rh` in the view you are extending and this causes an error as the system does not know which element should be extended.

---

<div class="post-metadata">

**Author:** ![mahija](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@mahija](https://discuss.tryton.org/u/mahija)\
**Post date:** [February 19, 2025, 3:31am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/6 "2025-02-19T03:31:53Z")

</div>

```auto
                    <xpath expr="//field[@name='du']" position="attributes">
                      <attribute name="invisible">1</attribute>
                    </xpath>

```

Eventhough I do this, i can’t open the menu.

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [February 19, 2025, 2:45pm UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/7 "2025-02-19T14:45:43Z")

</div>

You should replace attributes if you want to update them. Something like:

```auto
<xpath expr="//field[@name='du']" position="replace_attributes">
    <field name="du" invisible="1"/>
</xpath>

```

---

<div class="post-metadata">

**Author:** ![mahija](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@mahija](https://discuss.tryton.org/u/mahija)\
**Post date:** [February 20, 2025, 3:25am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/8 "2025-02-20T03:25:54Z")

</div>

Still stuck in this  
 ![image](https://discuss-cdn.tryton.org/uploads/default/original/2X/4/4b0c6b9a5337acd929f4587d533e0b0a0cee792a.png)

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [February 20, 2025, 9:19am UTC](https://discuss.tryton.org/t/how-to-hide-tabs-in-tryton-without-disabling-the-module-or-reinstalling-all/8313/9 "2025-02-20T09:19:24Z")

</div>

Probably you have and error on some view definition, you should review your server logs.
