I’m trying to inherit the ticket model from the helpdesk module and add a new ticketCategory field, which is similar to the ticketType field, my module is called axelor-divers & here is my model definition:
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
<module name="helpdesk" package="com.axelor.apps.helpdesk.db"/>
<entity name="Ticket_inherited" extends="Ticket">
<string name="test" title="Test"/>
<many-to-one name="ticketCategory" ref="com.axelor.apps.helpdesk.db.TicketCategory" title="Ticket Category"/>
</entity>
</domain-models>
The ticketCategory definition is as follow:
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
<module name="helpdesk" package="com.axelor.apps.helpdesk.db"/>
<entity name="TicketCategory">
<string name="name" required="true"/>
</entity>
</domain-models>
The problem is that once I inherit the form view & add the « ticketCategory » field, It appears to be unrecognized by the system:
Yet in the database I can see that the field is present:
PS: I created the simple string field to see if I messed something with the relation, but I got the same problem, so I figured that someone is wrong with the way I implemented the inheritance.
PS2: As I mentioned, the module name is axelor-divers, but in the package definition in the model, I put helpdesk because divers does not seem to add the field in the database, or may-be this is just another mistake from my part?
If someone could clarify what the module should be set to in case of inheritance, that would be very helpful.
Thank you