Skip to content

Commit 9489af1

Browse files
author
Valeriy Nayda
authored
Merge pull request magento#215 from magento-engcom/modularity-inventory-catalog
Broken modularity in InventoryCatalog
2 parents 36f759e + ef6f15f commit 9489af1

4 files changed

Lines changed: 21 additions & 7 deletions

File tree

app/code/Magento/InventoryCatalog/etc/adminhtml/di.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9-
<!-- Stock delete button -->
10-
<type name="Magento\InventoryCatalog\Ui\Component\Control\Stock\DeleteButton">
11-
<arguments>
12-
<argument name="deleteButton" xsi:type="object">Magento\Inventory\Ui\Component\Control\Stock\DeleteButton</argument>
13-
</arguments>
14-
</type>
159
<!-- Product form configurations -->
1610
<virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
1711
<arguments>

app/code/Magento/InventoryCatalog/Ui/Component/Control/Stock/DeleteButton.php renamed to app/code/Magento/InventorySales/Ui/Component/Control/Stock/DeleteButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\InventoryCatalog\Ui\Component\Control\Stock;
8+
namespace Magento\InventorySales\Ui\Component\Control\Stock;
99

1010
use Magento\Backend\Ui\Component\Control\DeleteButton as StockDeleteButton;
1111
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9+
<!-- Stock delete button -->
10+
<type name="Magento\InventorySales\Ui\Component\Control\Stock\DeleteButton">
11+
<arguments>
12+
<argument name="deleteButton" xsi:type="object">Magento\Inventory\Ui\Component\Control\Stock\DeleteButton</argument>
13+
</arguments>
14+
</type>
15+
</config>

app/code/Magento/InventorySales/view/adminhtml/ui_component/inventory_stock_form.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
*/
77
-->
88
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
9+
<settings>
10+
<buttons>
11+
<button name="delete" class="Magento\InventorySales\Ui\Component\Control\Stock\DeleteButton"/>
12+
</buttons>
13+
</settings>
914
<fieldset name="sales_channels" sortOrder="30">
1015
<settings>
1116
<label translate="true">Sales Channels</label>

0 commit comments

Comments
 (0)