Retrieve the value of an overload field

Hello,

I would like to retrieve the value of a field. This field is in a module that I overridden via an xml tag,
extension=« true »
I therefore do not see it in my module which inherits from this one.

How should I do it ?

Can you show us your original view and your extension view ?

The original view has too many characters to post. (XML)
But this is the view of the project module (ProjectTask.xml)

<form name="project-task-form" title="Task" model="com.axelor.apps.project.db.ProjectTask" onNew="action-project-task-group-onnew" onLoad="action-project-task-group-timer-process"

My extends is:

  <form name="project-task-form" title="Task" model="com.axelor.apps.project.db.ProjectTask"
    onNew="action-project-task-group-onnew" onLoad="action-project-task-group-timer-process"
     width="large" id="ordered-projectTask-form" extension="true">

I would like to retrieve the value of the ParentTask field which is present only in the parent module.

According to this file : https://github.com/axelor/axelor-open-suite/blob/8edf28ff533c6a908e4688d250c911d9709c96bc/axelor-project/src/main/resources/domains/ProjectTask.xml, parentTask is parentTask.

Yes that’s exactly it. But how do I get to read this record from my class extends ? Please

In fact I want to retrieve the ID of the parent task selected in the parentTask field

If it’s parentTask
<field name="parentTask" .... />

If it’s just the id , try this
<field name="parentTask?.id" .... />

ok I try this. Thanks

What IDE are you using to develop ?

Hello PHPierre , Éclipse why ?

it’s good, the name package must to be the same all

I developed a IntelliJ IDEA plugin to avoid to lose time to navigate in the code and to autocomplete field name. In your case, it can be very helpful if you develop using XML.

ok, for the moment I do not use intelliJ it is not yet planned for the trip but thank you in any case for the proposal :wink:

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