Surcharge vue déjà existante dans le framework

Pour les Français : Bonjour j’aimerais pouvoir utiliser un module déjà existant dans le framework la vue projet. Comment je peux faire pour surcharger la vue - modele déjà existante et y rajouter mes champs. merci pour votre aide.

For the English: Hello, I would like to be able to use an already existing module in the project view framework. How can I overload the existing view - model and add my fields to it? Thanks for your help.


You copy the complete view in your specific module, then you add a unique id, then you make your changes in your specific view.
Example for view address-grid :


<grid id="forum-address-grid" name="address-grid"
title="Address list" model="com.axelor.apps.base.db.Address"


For the domain, there is no id
You copy the domain in your specific module
But, you just need to add the new fields:

<?xml version="1.0" encoding="UTF-8"?>
    <domain-models xmlns=""

    module name="base" package="com.axelor.apps.base.db"/>

    <entity name="Address" lang="java">

         <string name="newField" title="New field" />



Hello PakMax,

Is this the only method? I saw that we could use extensions, isn’t it done precisely for the use of already existing views? I am wrong ?

Thanks for your first response.

For domains,
with the previous
solution, you keep the same entity (same table, with additional fields)
with extends you create another entity (AppExpense: new table) related to the original table App.

	<entity name="AppExpense" lang="java" extends="App">
		<boolean name="computeDistanceWithWebService" />

The method with extends probably has advantages that some will be able to confirm (data migration, etc.).

For views

ok thanks , why do you always put lang=« java »?

It is not mandatory: it is the source code generation language and by default it is Java

Ok thank you
When I try to overload I have some problems:
yet my compile works.

When I run it in eclipse I get this error any idea? :

2022-03-28 15:07:42.636 DEBUG 17796 — [ost-startStop-1] : Configure module: com.axelor.apps.businessproject.module.BusinessProjectModule
2022-03-28 15:07:42.651 ERROR 17796 — [ost-startStop-1] o.a.c.c.C.[.[localhost].[/axelor-erp] : Exception lors de l’envoi de l’évènement contexte initialisé (context initialized) à l’instance de classe d’écoute (listener) [com.axelor.web.AppContextListener]
java.lang.NoClassDefFoundError: com/axelor/apps/supplychain/service/SaleOrderInvoiceServiceImpl
at com.axelor.apps.businessproject.module.BusinessProjectModule.configure(
at com.axelor.web.AppServletModule.configureServlets(
at com.axelor.web.AppContextListener.getInjector(
at com.axelor.web.AppContextListener.contextInitialized(
at org.apache.catalina.core.StandardContext.listenerStart(
at org.apache.catalina.core.StandardContext.startInternal(
at org.apache.catalina.util.LifecycleBase.start(
at org.apache.catalina.core.ContainerBase$
at org.apache.catalina.core.ContainerBase$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.ClassNotFoundException: com.axelor.apps.supplychain.service.SaleOrderInvoiceServiceImpl
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
… 30 common frames omitted
2022-03-28 15:07:42.651 ERROR 17796 — [ost-startStop-1] o.apache.catalina.core.StandardContext : Un ou plusieurs écouteurs n’ont pas pu démarrer, les détails sont dans le fichier de log du conteneur
2022-03-28 15:07:42.652 ERROR 17796 — [ost-startStop-1] o.apache.catalina.core.StandardContext : Erreur de démarrage du contexte [/axelor-erp] suite aux erreurs précédentes

I am trying to overload view and task domain in project. For information

Hello again,

I can’t overload the project view already present in the framework.

I know that I have to respect the same model etc… but even that does not work. Does anyone have an idea to solve my overload problem? please

I’m just trying to overload this view to add my fields to it while keeping the functioning of the existing model.

I just want to know what I should put in my domain and model, to keep the framework’s project view and model, while adding my custom fields.
Can you give me the steps to follow. Thank you

It is better to go through the overloads, it is the best practice rather than a copy paste, I confirm it to you.
Problem solved.
Thanks for the responses on this.

1 « J'aime »

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