mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 15:32:27 +00:00
refactor: drop translation marking from default warehouse names
warehouse_name is a Data field shown as stored, and everywhere else
users see the docname, which carries the company abbr ("Stores - F")
and is never translated - a translated bare "Stores" has no display
use, so the identity _ marking from #57392 serves nothing. The
exists-guard keeps the runtime session-translation match that protects
legacy sites from duplicate English warehouses.
This commit is contained in:
@@ -448,23 +448,18 @@ class Company(NestedSet):
|
|||||||
frappe.clear_cache()
|
frappe.clear_cache()
|
||||||
|
|
||||||
def create_default_warehouses(self):
|
def create_default_warehouses(self):
|
||||||
from erpnext.setup.utils import identity as _
|
|
||||||
|
|
||||||
parent_warehouse = None
|
parent_warehouse = None
|
||||||
for wh_detail in [
|
for wh_detail in [
|
||||||
{"warehouse_name": _("All Warehouses"), "is_group": 1},
|
{"warehouse_name": "All Warehouses", "is_group": 1},
|
||||||
{"warehouse_name": _("Stores"), "is_group": 0},
|
{"warehouse_name": "Stores", "is_group": 0},
|
||||||
{"warehouse_name": _("Work In Progress"), "is_group": 0},
|
{"warehouse_name": "Work In Progress", "is_group": 0},
|
||||||
{"warehouse_name": _("Finished Goods"), "is_group": 0},
|
{"warehouse_name": "Finished Goods", "is_group": 0},
|
||||||
{"warehouse_name": _("Goods In Transit"), "is_group": 0, "warehouse_type": "Transit"},
|
{"warehouse_name": "Goods In Transit", "is_group": 0, "warehouse_type": "Transit"},
|
||||||
]:
|
]:
|
||||||
if frappe.db.exists(
|
if frappe.db.exists(
|
||||||
"Warehouse",
|
"Warehouse",
|
||||||
{
|
{
|
||||||
"warehouse_name": (
|
"warehouse_name": ("in", (wh_detail["warehouse_name"], _(wh_detail["warehouse_name"]))),
|
||||||
"in",
|
|
||||||
(wh_detail["warehouse_name"], frappe._(wh_detail["warehouse_name"])),
|
|
||||||
),
|
|
||||||
"company": self.name,
|
"company": self.name,
|
||||||
},
|
},
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user