How to hide field on parent module from child module

Dear Tryton team,
I’ve wondering if is it possible to hide an existing field or label after install a new child module, and what it’s the correct way to do that. My first thought was to create a field called: “empty” with blank space as label and then use replace :

<xpath expr="/form/field[@name=“parent_field”]" position=“replace”>
<label name=“empty”>

Is this a correct approach or should I use a better solution?
Thanks in advance

Removing existing field is always dangerous because other modules may depend of the presence of the field. But it will work, I would just use id instead of name because empty is probably not a field name.
Otherwise you could simple make it invisible by adding the attribute invisible="1".

Good, I can modify the attributes, it’s a more elegant way. thanks cedric!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.