diff --git a/erpnext/subcontracting/doctype/subcontracting_inward_order/subcontracting_inward_order.py b/erpnext/subcontracting/doctype/subcontracting_inward_order/subcontracting_inward_order.py index c591d28ed47..b918569a02b 100644 --- a/erpnext/subcontracting/doctype/subcontracting_inward_order/subcontracting_inward_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_inward_order/subcontracting_inward_order.py @@ -224,7 +224,7 @@ class SubcontractingInwardOrder(SubcontractingController): if not any([rm.is_customer_provided_item for rm in raw_materials]): frappe.throw( _( - "Atleast one raw material for Finished Good Item {0} should be customer provided." + "At least one raw material for Finished Good Item {0} should be customer provided." ).format(frappe.bold(item.item_code)) ) diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py index 617791cda48..e9909e4a28f 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py @@ -139,12 +139,14 @@ class SubcontractingOrder(SubcontractingController): frappe.throw(_("Please select a valid Purchase Order that is configured for Subcontracting.")) if po.docstatus != 1: - msg = f"Please submit Purchase Order {po.name} before proceeding." - frappe.throw(_(msg)) + frappe.throw(_("Please submit Purchase Order {0} before proceeding.").format(po.name)) if po.per_received == 100: - msg = f"Cannot create more Subcontracting Orders against the Purchase Order {po.name}." - frappe.throw(_(msg)) + frappe.throw( + _("Cannot create more Subcontracting Orders against the Purchase Order {0}.").format( + po.name + ) + ) else: self.service_items = self.items = self.supplied_items = None frappe.throw(_("Please select a Subcontracting Purchase Order.")) @@ -172,8 +174,11 @@ class SubcontractingOrder(SubcontractingController): if self.supplier_warehouse: for item in self.supplied_items: if self.supplier_warehouse == item.reserve_warehouse: - msg = f"Reserve Warehouse must be different from Supplier Warehouse for Supplied Item {item.main_item_code}." - frappe.throw(_(msg)) + frappe.throw( + _( + "Reserve Warehouse must be different from Supplier Warehouse for Supplied Item {0}." + ).format(item.main_item_code) + ) def set_missing_values(self): self.calculate_additional_costs() diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index 0c786638b2d..2171fd7d65e 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -143,7 +143,7 @@ class SubcontractingReceipt(SubcontractingController): self.validate_inspection() if getdate(self.posting_date) > getdate(nowdate()): - frappe.throw(_("Posting Date cannot be future date")) + frappe.throw(_("Posting Date cannot be a future date")) super().validate()