Skip to content

Commit

Permalink
added order fields to lines csv
Browse files Browse the repository at this point in the history
  • Loading branch information
Afonso Caldas committed Jun 9, 2016
1 parent 0556791 commit 68ab57d
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/budy/controllers/api/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,15 @@ def lines_csv(self, key):
"quantity",
"size",
"scale",
"total",
"currency"
"gender",
"line_total",
"currency",
"order_id",
"order_reference",
"order_total",
"order_status",
"account",
"date",
)]
for line in order.lines:
if not line.product: continue
Expand All @@ -425,8 +432,15 @@ def lines_csv(self, key):
line.quantity,
line.size,
line.scale,
line.product.gender,
line.total,
line.currency
line.currency,
order.id,
order.reference,
order.total,
order.status,
order.account.username,
order.created_d.strftime("%d/%m/%Y"),
)
lines_s.append(line_s)

Expand Down

0 comments on commit 68ab57d

Please sign in to comment.