mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Use the part_deep_copy setting to set the default deep_copy value when duplicating a part
This commit is contained in:
parent
9cef038d6a
commit
d059aff4f8
@ -23,7 +23,7 @@ from .models import PartParameterTemplate, PartParameter
|
|||||||
from .models import BomItem
|
from .models import BomItem
|
||||||
from .models import match_part_names
|
from .models import match_part_names
|
||||||
|
|
||||||
from common.models import Currency
|
from common.models import Currency, InvenTreeSetting
|
||||||
from company.models import SupplierPart
|
from company.models import SupplierPart
|
||||||
|
|
||||||
from . import forms as part_forms
|
from . import forms as part_forms
|
||||||
@ -396,6 +396,8 @@ class PartDuplicate(AjaxCreateView):
|
|||||||
else:
|
else:
|
||||||
initials = super(AjaxCreateView, self).get_initial()
|
initials = super(AjaxCreateView, self).get_initial()
|
||||||
|
|
||||||
|
initials['deep_copy'] = str2bool(InvenTreeSetting.get_setting('part_deep_copy', True))
|
||||||
|
|
||||||
return initials
|
return initials
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user