﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26579	Control deep copy depth for 'save as new' in admin with inlines	heka	nobody	"Proposal:

Add 'save_as' class attribute to InlineModelAdmin. By default it should probably True.

ModelAdmin could then be modified as followed:

{{{
    def get_formsets_with_inlines(self, request, obj=None):
        """"""
        Yields formsets and the corresponding inlines.
        """"""
        if '_saveasnew' in request.POST:
            inline_instances = [inline_instance for inline_instance in self.get_inline_instances(request, obj)
                                if getattr(inline_instance, 'save_as', True)]
        else:
            inline_instances = self.get_inline_instances(request, obj)

        for inline in inline_instances:
            yield inline.get_formset(request, obj), inline

}}}

This change will allow you to control the save_as behavior per inline"	New feature	new	contrib.admin	1.9	Normal		saveasnew		Unreviewed	0	0	0	0	0	0
