Exemple #1
0
def edit_file(request, id, file_id):
    """
    id = order_id
    file_id = file_id
    """
    order = Core.current_user().get_permitted_objects("VIEW", Order).all().get(id=id)
    file = order.files.get(id=file_id)
    additional_data = {'order': order}

    return file_form(request, order, file, redirect(overview, id), additional_data, template="orders/files/form.html")
Exemple #2
0
def edit_file(request, id, file_id):
    """
    id = project_id
    file_id = file_id
    """
    instance = Core.current_user().get_permitted_objects("VIEW", Product).all().get(id=id)
    file = instance.files.get(id=file_id)
    additional_data = {'product': instance}

    return file_form(request, instance, file, redirect(overview, id), additional_data,
                     template="stock/files/form.html")
Exemple #3
0
def add_file(request, id):
    """
    id = customer_id
    """
    customer = Core.current_user().get_permitted_objects("VIEW", Customer).all().get(id=id)
    file = File()

    additional_data = {'customer': customer}


    return file_form(request, customer, file, redirect(overview, id), additional_data,
                     template="customers/files/form.html")
Exemple #4
0
def add_file(request, id):
    """
    id = project_id
    """
    project = Core.current_user().get_permitted_objects("VIEW", Project).all().get(id=id)
    file = File()

    additional_data = {'project': project}


    return file_form(request, project, file, redirect(overview, id), additional_data,
                     template="projects/files/form.html")
Exemple #5
0
def edit_file(request, id, file_id):
    """
    id = order_id
    file_id = file_id
    """
    order = Core.current_user().get_permitted_objects("VIEW",
                                                      Order).all().get(id=id)
    file = order.files.get(id=file_id)
    additional_data = {'order': order}

    return file_form(request,
                     order,
                     file,
                     redirect(overview, id),
                     additional_data,
                     template="orders/files/form.html")
Exemple #6
0
def add_file(request, id):
    """
    id = customer_id
    """
    customer = Core.current_user().get_permitted_objects(
        "VIEW", Customer).all().get(id=id)
    file = File()

    additional_data = {'customer': customer}

    return file_form(request,
                     customer,
                     file,
                     redirect(overview, id),
                     additional_data,
                     template="customers/files/form.html")
Exemple #7
0
def add_file(request, id):
    """
    id = project_id
    """
    project = Core.current_user().get_permitted_objects(
        "VIEW", Project).all().get(id=id)
    file = File()

    additional_data = {'project': project}

    return file_form(request,
                     project,
                     file,
                     redirect(overview, id),
                     additional_data,
                     template="projects/files/form.html")
Exemple #8
0
def edit_file(request, id, file_id):
    """
    id = project_id
    file_id = file_id
    """
    instance = Core.current_user().get_permitted_objects(
        "VIEW", Product).all().get(id=id)
    file = instance.files.get(id=file_id)
    additional_data = {'product': instance}

    return file_form(request,
                     instance,
                     file,
                     redirect(overview, id),
                     additional_data,
                     template="stock/files/form.html")