commit a7c63b071a33ee4a581f0c62bd93e35f18ef09fc
parent 3c834164170714a215b0609b821ad678c65c8bcc
Author: Timo A. Hummel <felicitus@felicitus.org>
Date: Fri, 6 May 2016 19:23:09 +0200
Merge pull request #661 from partkeepr/PartKeepr-660
Clear the stock levels when creating an item and taking over all data…
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js
@@ -405,7 +405,9 @@ Ext.define('PartKeepr.PartEditor', {
newItem = Ext.create("PartKeepr.PartBundle.Entity.Part");
newItem.set(data);
newItem.setAssociationData(this.record.getAssociationData());
+ newItem.stockLevels().removeAll();
this.editItem(newItem);
+
} else {
newItem = Ext.create("PartKeepr.PartBundle.Entity.Part");
newItem.setPartUnit(PartKeepr.getApplication().getDefaultPartUnit());