I found almost how the print button is created on the invoice page (invoked from
vendor/magento/module-backend/view/adminhtml/templates/widget/button.phtml) with the debug option in Magento2. I would like to add in directly on the order page to avoid going to the invoice page each time. I can't find the exact code that need to be added to my custom
adminhtml to add it.
I would like to find how to add the function who generate this code :
<button id="print" title="Print" type="button" class="action-default scalable print" onclick="setLocation('MAGENTO_URL/admin/sales/order_invoice/print/invoice_id/ID/')" data-ui-id="sales-invoice-view-print-button"> <span>Print</span> </button>
If possible to add like after the
view link or as a button on the order information tab since I already have some custom code for this page:
Thanks in advance