示例#1
0
文件: register.py 项目: rokj/sellout
def mobile_delete_register(request, company_id):
    try:
        c = Company.objects.get(url_name=company_id)
    except Company.DoesNotExist:
        return JsonError(_("Company does not exist"))
    return manage_delete_object(request, c, Register,
                                (_("You have no permission to delete registers"), _("Could not delete register")))
示例#2
0
文件: discount.py 项目: rokj/sellout
def delete_discount(request, company):
    return manage_delete_object(request, company, Discount, (
        _("You have no permission to delete discounts"),
        _("Could not delete discount: ")
    ))
示例#3
0
文件: contact.py 项目: rokj/sellout
def delete_contact(request, company):
    return manage_delete_object(request, company, Contact, (_("You have no permission to delete contacts"),
                                                            _("Could not delete contact")))
示例#4
0
文件: register.py 项目: rokj/sellout
def delete_register(request, company):
    return manage_delete_object(request, company, Register,
                                (_("You have no permission to delete registers"), _("Could not delete register")))