chore: linter
This commit is contained in:
parent
f028bd6e69
commit
b26e96cdf4
@ -74,19 +74,25 @@ class SubcontractingController(StockController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not is_stock_item:
|
if not is_stock_item:
|
||||||
frappe.throw(_(f"Row {item.idx}: Item {item.item_name} must be a stock item."))
|
frappe.throw(_("Row {0}: Item {1} must be a stock item.").format(item.idx, item.item_name))
|
||||||
|
|
||||||
if not is_sub_contracted_item:
|
if not is_sub_contracted_item:
|
||||||
frappe.throw(_(f"Row {item.idx}: Item {item.item_name} must be a subcontracted item."))
|
frappe.throw(
|
||||||
|
_("Row {0}: Item {1} must be a subcontracted item.").format(item.idx, item.item_name)
|
||||||
|
)
|
||||||
|
|
||||||
if item.bom:
|
if item.bom:
|
||||||
bom = frappe.get_doc("BOM", item.bom)
|
bom = frappe.get_doc("BOM", item.bom)
|
||||||
if not bom.is_active:
|
if not bom.is_active:
|
||||||
frappe.throw(_(f"Row {item.idx}: Please select an active BOM for Item {item.item_name}."))
|
frappe.throw(
|
||||||
|
_("Row {0}: Please select an active BOM for Item {1}.").format(item.idx, item.item_name)
|
||||||
|
)
|
||||||
if bom.item != item.item_code:
|
if bom.item != item.item_code:
|
||||||
frappe.throw(_(f"Row {item.idx}: Please select an valid BOM for Item {item.item_name}."))
|
frappe.throw(
|
||||||
|
_("Row {0}: Please select an valid BOM for Item {1}.").format(item.idx, item.item_name)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
frappe.throw(_(f"Row {item.idx}: Please select a BOM for Item {item.item_name}."))
|
frappe.throw(_("Row {0}: Please select a BOM for Item {1}.").format(item.idx, item.item_name))
|
||||||
|
|
||||||
def __get_data_before_save(self):
|
def __get_data_before_save(self):
|
||||||
item_dict = {}
|
item_dict = {}
|
||||||
|
@ -199,7 +199,7 @@ class SubcontractingReceipt(SubcontractingController):
|
|||||||
for item in self.items:
|
for item in self.items:
|
||||||
if not (item.qty or item.rejected_qty):
|
if not (item.qty or item.rejected_qty):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_(f"Row {item.idx}: Accepted Qty and Rejected Qty can't be zero at the same time.")
|
_("Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.").format(item.idx)
|
||||||
)
|
)
|
||||||
|
|
||||||
def set_items_bom(self):
|
def set_items_bom(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user