2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Improve introspection in migration file

This commit is contained in:
Oliver Walters
2021-05-11 18:23:29 +10:00
parent 725a64c29d
commit ed4da4d338
2 changed files with 17 additions and 11 deletions

View File

@ -641,8 +641,8 @@ class StockItem(MPTTModel):
tracking_info['location_name'] = location.name
if self.customer:
tracking_info['customer'] = customer.id
tracking_info['customer_name'] = customer.name
tracking_info['customer'] = self.customer.id
tracking_info['customer_name'] = self.customer.name
self.add_tracking_entry(
StockHistoryCode.RETURNED_FROM_CUSTOMER,
@ -849,7 +849,7 @@ class StockItem(MPTTModel):
StockHistoryCode.REMOVED_CHILD_ITEM,
user,
deltas={
'stockitem': self.pk,
'stockitem': self.pk,
},
notes=notes,
url=self.get_absolute_url(),
@ -1183,11 +1183,6 @@ class StockItem(MPTTModel):
return True
if self.location:
msg = _("Moved to {loc_new} (from {loc_old})").format(loc_new=str(location), loc_old=str(self.location))
else:
msg = _('Moved to {loc_new}').format(loc_new=str(location))
self.location = location
tracking_info = {}