Conditional View Extension Not Working in Axelor Modules

Hello everyone,

I’m encountering an issue with Axelor Open Platform and need some help.

We have created several modules within the same project, including:

A base module
A specific module
In the specific module, I have extended a view from the base module. However, this extension is visible even if the specific module is not installed in the application configuration. I have tried using « if-module, » but it has no effect.

I am looking to understand why the view extension from the specific module is visible even when this module is not installed, and how to ensure that this extension is only applied when the specific module is indeed installed.

Thank you in advance for your help and advice!

Hi Tanguy,

We understand your concern about ensuring that the view extension from the specific module is only visible when the module is installed in the application configuration. To address this issue, you can use an if condition to check if the module is installed.

You can add the following condition to your view extension:

if="__config__.app.isApp('your_module_code')"

Replace 'your_module_code' with the module code of your specific module. This condition ensures that the view extension is only applied when the specific module is installed.

For more detailed information and examples, you can refer to the official Github link Axelor Open Suit Github.

If you have any further questions or need additional assistance, please feel free to ask.

Best regards,

Hello, about the view extension, does re-importing the view delete all the extension views ? I’m trying to build some , they works, but when i’m re-importing the view, the extension view is deleted, the computed view is here and i got 2 standard view with the same XML

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.