Skip to content

Commit

Permalink
Merge PR #1169 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jan 7, 2025
2 parents cc279a6 + 093fce0 commit 6db5781
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions contract/models/contract_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,18 +597,18 @@ def _get_period_to_invoice(

def _translate_marker_month_name(self, month_name):
months = {
"January": _("January"),
"February": _("February"),
"March": _("March"),
"April": _("April"),
"May": _("May"),
"June": _("June"),
"July": _("July"),
"August": _("August"),
"September": _("September"),
"October": _("October"),
"November": _("November"),
"December": _("December"),
"01": _("January"),
"02": _("February"),
"03": _("March"),
"04": _("April"),
"05": _("May"),
"06": _("June"),
"07": _("July"),
"08": _("August"),
"09": _("September"),
"10": _("October"),
"11": _("November"),
"12": _("December"),
}
return months[month_name]

Expand All @@ -623,7 +623,7 @@ def _insert_markers(self, first_date_invoiced, last_date_invoiced):
name = name.replace(
"#INVOICEMONTHNAME#",
self.with_context(lang=lang.code)._translate_marker_month_name(
first_date_invoiced.strftime("%B")
first_date_invoiced.strftime("%m")
),
)
return name
Expand Down

0 comments on commit 6db5781

Please sign in to comment.