CORD-2049: Remove redundant imports provided by xosbase, support missing
header.py

Change-Id: I7620817d71b7deff94e48335036394a1ac741209
(cherry picked from commit fc14f3aba12540b66491ccfcc6686ff3ce499ae1)
diff --git a/lib/xos-genx/xosgenx/targets/service.xtarget b/lib/xos-genx/xosgenx/targets/service.xtarget
index ceb173c..9d2915d 100644
--- a/lib/xos-genx/xosgenx/targets/service.xtarget
+++ b/lib/xos-genx/xosgenx/targets/service.xtarget
@@ -2,14 +2,15 @@
 {% set legacy_tag = '_decl' %}
 {% set legacy = True %}
 from core.models.xosbase import *
-from core.models import ServiceInstance
-from django.db import models
-from django.db.models import *
-from core.models.xosbase import StrippedCharField
+from core.models import ServiceInstance, TenantWithContainer
 {% else %}
 {% set legacy = False %}
 {% set legacy_tag = '' %}
-{% if file_exists('header.py') -%}from header import *{% endif %}
+{% if file_exists('../header.py') or file_exists('header.py')-%}from header import *
+{% else %}
+from core.models.xosbase import *
+from core.models import ServiceInstance, TenantWithContainer
+{% endif %}
 {% endif %}
 
 {% for m in proto.messages %}