>>> a1=HeadBill.objects.filter(CustomerID_id__customerID=str(pk), BillNumber=1)
>>> print(a1.query)
SELECT "core_headbill"."HeadBillID", "core_headbill"."CustomerID_id", "core_headbill"."BillDate", "core_headbill"."BillNumber"
FROM "core_headbill"
INNER JOIN "core_customer"
ON ("core_headbill"."CustomerID_id" = "core_customer"."CustomerID")
INNER JOIN "core_headbill"
T3 ON ("core_customer"."CustomerID" = T3."CustomerID_id")
WHERE ("core_headbill"."BillNumber" = 1 AND T3."HeadBillID" = 1)
Last active
May 7, 2020 07:14
-
-
Save LuisQBlanco/ad67ecb09f5704bf729f3f19ad40a056 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment