I searched for that, but I could not find any resource. How to add product grid in to "Add product" in admin side like related product?
1 Answer
vendor/magento/module-inventory-sales-admin-ui/view/adminhtml/ui_component/product_form.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="salable_quantity" sortOrder="55">
<settings>
<label translate="true">Product Salable Quantity</label>
<collapsible>true</collapsible>
<opened>false</opened>
<visible>0</visible>
</settings>
<container name="salable_quantity_container" template="Magento_InventorySalesAdminUi/product/form/salable-quantity" sortOrder="10">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="formElement" xsi:type="string">container</item>
<item name="breakLine" xsi:type="boolean">false</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="imports" xsi:type="array">
<item name="salable_quantity" xsi:type="string">${ $.provider }:data.salable_quantity</item>
</item>
</item>
</argument>
</container>
</fieldset>
</form>