fix: add translate function to period in sales_analytics.py
(cherry picked from commit 083a78135c)
This commit is contained in:
@@ -313,11 +313,11 @@ class Analytics(object):
|
||||
|
||||
def get_period(self, posting_date):
|
||||
if self.filters.range == "Weekly":
|
||||
period = "Week " + str(posting_date.isocalendar()[1]) + " " + str(posting_date.year)
|
||||
period = _("Week {0} {1}").format(str(posting_date.isocalendar()[1]), str(posting_date.year))
|
||||
elif self.filters.range == "Monthly":
|
||||
period = str(self.months[posting_date.month - 1]) + " " + str(posting_date.year)
|
||||
period = _(str(self.months[posting_date.month - 1])) + " " + str(posting_date.year)
|
||||
elif self.filters.range == "Quarterly":
|
||||
period = "Quarter " + str(((posting_date.month - 1) // 3) + 1) + " " + str(posting_date.year)
|
||||
period = _("Quarter {0} {1}").format(str(((posting_date.month - 1) // 3) + 1), str(posting_date.year))
|
||||
else:
|
||||
year = get_fiscal_year(posting_date, company=self.filters.company)
|
||||
period = str(year[0])
|
||||
|
||||
Reference in New Issue
Block a user