Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if x == 1: month = "January"
- elif x == 2: month = "February"
- elif x == 3: month = "March"
- elif x == 4: month = "April"
- elif x == 5: month = "May"
- elif x == 6: month = "June"
- elif x == 7: month = "July"
- elif x == 8: month = "August"
- elif x == 9: month = "September"
- elif x == 10: month = "October"
- elif x == 11: month = "November"
- elif x == 12: month = "December"
- for tiket in tiket_obj.browse(self.cr, self.uid, tiket_ids):
- ticket_date = datetime.strptime(tiket.create_date, '%Y-%m-%d %H:%M:%S')
- if int(ticket_date.month) == int(x):
- amount += tiket.price
- result = {
- 'period': month,
- 'amount': amount,
- }
- data.append(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement