Created
April 15, 2011 23:21
-
-
Save wraithan/922644 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [5]: unicode(Stock.objects.filter(box=None).query) | |
Out[5]: u'SELECT "inventory_stock"."id", "inventory_stock"."created_at", "inventory_stock"."created_by", | |
"inventory_stock"."updated_at", "inventory_stock"."updated_by", "inventory_stock"."barcode_id", | |
"inventory_stock"."box_id", "inventory_stock"."cart_id", "inventory_stock"."holder_id", | |
"inventory_stock"."location_id", "inventory_stock"."pallet_id", "inventory_stock"."parent_stock_id", | |
"inventory_stock"."pick_claim_id", "inventory_stock"."picker_id", "inventory_stock"."piece_id", | |
"inventory_stock"."purchase_line_id", "inventory_stock"."stock_transfer_id", | |
"inventory_stock"."expiration_date", "inventory_stock"."expiration_date_has_day", | |
"inventory_stock"."lot_number", "inventory_stock"."label_sheet_number", "inventory_stock"."status", | |
"inventory_stock"."weight" FROM "inventory_stock" LEFT OUTER JOIN "picking_box" ON ("inventory_stock"."box_id" | |
= "picking_box"."id") INNER JOIN "warehouse_pieces_piece" ON ("inventory_stock"."piece_id" = | |
"warehouse_pieces_piece"."id") WHERE "picking_box"."id" IS NULL ORDER BY "inventory_stock"."status" ASC, | |
"warehouse_pieces_piece"."name" ASC, "inventory_stock"."id" ASC' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment