{% extends 'sales/base.html' %} {% load static %} {% block breadcrumb %} {% endblock %} {% block content %}
{% csrf_token %}
{% if opportunity_obj %}EDIT{% else %}CREATE{% endif %} OPPORTUNITY
{{ opportunity_form.name }} {{opportunity_form.name.errors}}
{% if account %} {% else %} {{opportunity_form.account}} {% endif %} {{opportunity_form.account.errors}}
{{ opportunity_form.amount }} {{opportunity_form.amount.errors}}
{{opportunity_form.currency.errors}}
{{ opportunity_form.stage }} {{opportunity_form.stage.errors}}
{{ opportunity_form.lead_source }} {{opportunity_form.lead_source.errors}}
{{ opportunity_form.probability }} {{opportunity_form.probability.errors}}
{% if request.user.is_superuser or request.user.role == 'ADMIN' %}
{{ opportunity_form.teams.errors }}
{% endif %}
{{ opportunity_form.contacts }} {{opportunity_form.contacts.errors}}
{{ opportunity_form.closed_on }}
{{opportunity_form.closed_on.errors}}
{{ opportunity_form.description }} {{opportunity_form.description.errors}}
{% if opportunity_obj.opportunity_attachment.count %} {% for attachment in opportunity_obj.opportunity_attachment.all %}
{{ attachment.file_name }} {% if not attachment.created_by.role == 'ADMIN' or attachment.created_by.role == request.user.role %} X {% endif %}
{% endfor %} {% endif %}

{% if request.GET.view_account %} {% endif %}
{% if not opportunity_obj %} {% endif %} Cancel
0%
{% endblock %} {% block js_block %} {% endblock js_block %}