diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 0ae1d232171..13df4f5d34b 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -2128,7 +2128,13 @@ def check_item_quality_inspection(doctype, items): @frappe.whitelist() +<<<<<<< HEAD def make_quality_inspections(doctype, docname, items, inspection_type): +======= +def make_quality_inspections( + company: str, doctype: str, docname: str, items: str | list, inspection_type: str +): +>>>>>>> 74def423ed (fix(stock): pass company to avoid document naming rule issue in QI) if isinstance(items, str): items = json.loads(items) @@ -2147,6 +2153,7 @@ def make_quality_inspections(doctype, docname, items, inspection_type): quality_inspection = frappe.get_doc( { + "company": company, "doctype": "Quality Inspection", "inspection_type": inspection_type, "inspected_by": frappe.session.user, diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index aa02eec7b62..650611ee709 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2966,6 +2966,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe frappe.call({ method: "erpnext.controllers.stock_controller.make_quality_inspections", args: { + company: me.frm.doc.company, doctype: me.frm.doc.doctype, docname: me.frm.doc.name, items: selected_data,