Skip to content

Commit 51c281c

Browse files
committed
Merge remote-tracking branch 'origin/ACP2E-4167' into PR_2025_11_04_flowers
2 parents 182fdaa + b69782b commit 51c281c

File tree

1 file changed

+20
-1
lines changed
  • app/code/Magento/CatalogInventory/Model/Adminhtml/Stock

1 file changed

+20
-1
lines changed

app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
* Catalog Inventory Stock Model for adminhtml area
1919
* @method \Magento\CatalogInventory\Api\Data\StockItemExtensionInterface getExtensionAttributes()
2020
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
21+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2122
* @api
2223
* @since 100.0.2
2324
*
2425
* @deprecated 100.3.0 Replaced with Multi Source Inventory
26+
* @see Nothing
2527
* @link https://developer.adobe.com/commerce/webapi/rest/inventory/index.html
2628
* @link https://developer.adobe.com/commerce/webapi/rest/inventory/inventory-api-reference.html
2729
*/
@@ -77,7 +79,9 @@ public function __construct(
7779
$resourceCollection,
7880
$data
7981
);
80-
82+
if (!empty($data)) {
83+
$this->setOrigData();
84+
}
8185
$this->groupManagement = $groupManagement;
8286
}
8387

@@ -115,6 +119,8 @@ protected function _hasDefaultNotificationMessage()
115119
}
116120

117121
/**
122+
* Check if model is used in admin area
123+
*
118124
* @return bool
119125
*/
120126
public function hasAdminArea()
@@ -123,6 +129,8 @@ public function hasAdminArea()
123129
}
124130

125131
/**
132+
* Flg to show default notification message
133+
*
126134
* @return bool
127135
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
128136
*/
@@ -143,4 +151,15 @@ public function getIdentities()
143151

144152
return $tags;
145153
}
154+
155+
/**
156+
* @inheritDoc
157+
*/
158+
public function afterLoad()
159+
{
160+
parent::afterLoad();
161+
$this->setOrigData();
162+
163+
return $this;
164+
}
146165
}

0 commit comments

Comments
 (0)