code: def copy_plan(modeladmin, request, queryset):
      
      for plan in queryset:
          plan_copy = deepcopy(plan)
          plan_copy.id = None
          plan_copy.available = False
          plan_copy.default = False
          plan_copy.created = None
          plan_copy.save(force_insert=True)
  
          for pricing in plan.planpricing_set.all():
              pricing.id = None
              pricing.plan = plan_copy
              pricing.save(force_insert=True)
  
          for quota in plan.planquota_set.all():
              quota.id = None
              quota.plan = plan_copy
              quota.save(force_insert=True)
docs: Admin command for duplicating plans preserving quotas and pricings.