Template Print Model Copies on Business Objects

A new feature allows creating a copy of a template print model for a specific business object.

To use this feature:

  1. Add a many-to-one field templatePrintModel on your business object domain:

    <many-to-one name="templatePrintModel" title="Template print model" ref="com.axelor.template.db.TemplatePrintModel"/>
  2. Add the field to your XML view:

    <field name="templatePrintModel" domain="self.uploadStatus = 'ok' AND self.original = NULL"/>
  3. Add a button to create the copy:

    <button name="createCopyBtn" title="Copy" onClick="action-template-print-model-group-copy-template"/>
  4. Add the studio panel dashlet:

    <panel-dashlet colSpan="12" height="800" action="action.template.print.model.view.generic.studio"/>
The field name must be templatePrintModel. Names, titles, and component sizes can be customized as needed.