Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if int(request.user.typeprofile) == 2: # 2 = admin company | 1 = normal user | 3 = supervisor branche
- brancheselect = Branche.objects.get(code=id1)
- moduledata = Module.objects.get(id=5)
- listhistoryproduct = HistoryProduct.objects.filter(product__branche=brancheselect).order_by('-id')
- return render(request,'apps/reports/products/historyproduct.html',{'listhistoryproduct':listhistoryproduct,'brancheselect':brancheselect,'moduledata':moduledata})
- else:
- return HttpResponseRedirect('/error001/')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement