refactor: use Meta.get_translated_label (#58335)

This commit is contained in:
Raffael Meyer
2026-08-22 00:28:55 +02:00
committed by GitHub
parent eae36c2d67
commit e71e08959f
38 changed files with 95 additions and 149 deletions

View File

@@ -215,7 +215,7 @@ class SellingController(StockController):
if not (0 <= self.commission_rate <= 100.0):
throw(
"{} {}".format(
_(self.meta.get_label("commission_rate"), context=self.doctype),
self.meta.get_translated_label("commission_rate"),
_("must be between 0 and 100"),
)
)
@@ -306,12 +306,7 @@ class SellingController(StockController):
bold(ref_rate_field),
bold("net rate"),
bold(rate),
bold(
_(
frappe.get_meta("Selling Settings").get_label("validate_selling_price"),
context="Selling Settings",
)
),
bold(frappe.get_meta("Selling Settings").get_translated_label("validate_selling_price")),
get_link_to_form("Selling Settings"),
),
title=_("Invalid Selling Price"),