2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-12 07:54:14 +00:00

Renamed copyBomFrom to deepCopy

- Allows passing of more data (in the future) e.g. tags, etc
- Performs copy of the part image
This commit is contained in:
Oliver Walters
2019-05-13 21:54:52 +10:00
parent 00f7ece6b4
commit e1e5cde60f
2 changed files with 27 additions and 13 deletions

View File

@ -208,8 +208,7 @@ class PartDuplicate(AjaxCreateView):
original = self.get_part_to_copy()
if original:
if deep_copy:
part.copyBomFrom(original)
part.deepCopy(original, bom=deep_copy)
try:
data['url'] = part.get_absolute_url()
@ -230,7 +229,7 @@ class PartDuplicate(AjaxCreateView):
if part:
initials = model_to_dict(part)
else:
initials = super(AjaxCreateView, self).get_initials()
initials = super(AjaxCreateView, self).get_initial()
return initials