Axelor Doc

NestedEditor

For example, in a bill, having the ability to select a third will show the fields of the third object directly in the view of the bill. These fields are editable and impact the parent object.

Example:

<form cols="4" title="Order" name="order-form">
   ...
   <field name="customer" widget="NestedEditor" edit-window="blank" form-view="contact-form" summary-view="true">
       <form title="Customer" cols="4">
           <field name="title"/>
           <break/>
           <field name="firstName"/>
           <field name="lastName"/>
           <field name="email"/>
           <field name="phone"/>
       </form>
   </field>
   ...
</form>

Details attributes:

  • edit-window: Display Mode relational fields
    • self: Opening in the current view
    • blank: Open in new tab
    • popup: Opening a pop-up
  • form-view: Specifies the form view to open pop-up or tab
  • summary-view: Specifies an alternate view

Example:

If summary-view = "true" then the nested <form> is used as the "contents" "some-form-name" order and form-view = is used to open the view in a pop-up or in another tab .

<field name="customer" widget="NestedEditor" edit-window="blank" form-view="contact-form" summary-view="true">

If summary-view = "some-form-view-name" when the view is used as for "summary" and form-view = "some-form-name" is used to open the pop-up view or another tab.

<field summary-view="contact-form1" form-view="contact-form2" edit-window="blank" required="true" name="mainContact"/>