diff --git a/InventoryImportExport/Model/Import/Sources.php b/InventoryImportExport/Model/Import/Sources.php index 88459e7a667..d6915a0ce78 100644 --- a/InventoryImportExport/Model/Import/Sources.php +++ b/InventoryImportExport/Model/Import/Sources.php @@ -33,6 +33,13 @@ class Sources extends AbstractEntity public const COL_QTY = SourceItemInterface::QUANTITY; public const COL_STATUS = SourceItemInterface::STATUS; + protected $validColumnNames = [ + self::COL_SKU, + self::COL_SOURCE_CODE, + self::COL_QTY, + self::COL_STATUS + ]; + /** * @var Json */ @@ -91,6 +98,10 @@ public function __construct( $this->commands = $commands; $this->getSourceCodesBySkus = $getSourceCodesBySkus ?: ObjectManager::getInstance() ->get(\Magento\InventoryApi\Model\GetSourceCodesBySkusInterface::class); + + foreach ($this->errorMessageTemplates as $errorCode => $message) { + $this->getErrorAggregator()->addErrorMessageTemplate($errorCode, $message); + } } /**