emile 1 year ago
parent d7edbf9659
commit 473d4035f8

BIN
.DS_Store vendored

Binary file not shown.

BIN
osinaweb/.DS_Store vendored

Binary file not shown.

@ -34,7 +34,7 @@
<option value="" selected disabled>Select Project</option> <option value="" selected disabled>Select Project</option>
{% else %} {% else %}
{% for customer_project in customer_projects %} {% for customer_project in customer_projects %}
<option value="{{customer_project.id}}">{{customer_project.title}}</option> <option value="{{customer_project.id}}">{{customer_project.name}}</option>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</select> </select>

Binary file not shown.

@ -634,16 +634,18 @@ def add_ticket(request, customer_id):
if request.method == 'POST': if request.method == 'POST':
project = None project = None
product = None product = None
department_id = request.POST.get('department') if request.POST.get('department'):
department = get_object_or_404(Department, id=department_id) department = get_object_or_404(Department, id=request.POST.get('department'))
regarding = 'General/Account/Billing' regarding = 'General/Account/Billing'
if request.POST.get('project'): if request.POST.get('project'):
project = get_object_or_404(Project, id=request.POST.get('project')) project = get_object_or_404(Project, id=request.POST.get('project'))
department = project.project_type.department if not department:
department = project.project_type.department
regarding = 'Project/Product' regarding = 'Project/Product'
elif request.POST.get('product'): elif request.POST.get('product'):
product = get_object_or_404(Item, id=request.POST.get('product')) product = get_object_or_404(Item, id=request.POST.get('product'))
department = product.item_type.department if not department:
department = project.project_type.department
regarding = 'Project/Product' regarding = 'Project/Product'
ticket = Ticket( ticket = Ticket(
status = 'Open', status = 'Open',

Binary file not shown.

@ -35,7 +35,7 @@
<option value="" selected disabled>Select Project</option> <option value="" selected disabled>Select Project</option>
{% else %} {% else %}
{% for customer_project in customer_projects %} {% for customer_project in customer_projects %}
<option value="{{customer_project.id}}">{{customer_project.title}}</option> <option value="{{customer_project.id}}">{{customer_project.name}}</option>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</select> </select>

Binary file not shown.
Loading…
Cancel
Save