Skip to content

Commit 5aef5cb

Browse files
committed
10124: Wrong invoice entity_model in table eav_entity_type.
1 parent f93b914 commit 5aef5cb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

app/code/Magento/Sales/Setup/UpgradeData.php

+8
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
108108
[$setup]
109109
);
110110
}
111+
if (version_compare($context->getVersion(), '2.0.9', '<')) {
112+
//Correct wrong source model for "invoice" entity type, introduced by mistake in 2.0.1 upgrade.
113+
$salesSetup->updateEntityType(
114+
'invoice',
115+
'entity_model',
116+
\Magento\Sales\Model\ResourceModel\Order\Invoice::class
117+
);
118+
}
111119
$this->eavConfig->clear();
112120
}
113121

app/code/Magento/Sales/etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Sales" setup_version="2.0.8">
9+
<module name="Magento_Sales" setup_version="2.0.9">
1010
<sequence>
1111
<module name="Magento_Rule"/>
1212
<module name="Magento_Catalog"/>

0 commit comments

Comments
 (0)