Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Finished Goods for Manufacture from Sales Order to Production Plan fails when an item in Sales Order is non manufacturing item and does not have default BOM #36695

Closed
sameer-mahendru opened this issue Aug 17, 2023 · 1 comment
Assignees
Labels

Comments

@sameer-mahendru
Copy link

Information about bug

I expected all items that have a default BOM to fetched from Sales Order into Production Plan and items that do not have default BOM to be ignored. However, validation indicates that a single item does not have a default BOM and then fails to fetch any items at all.

Module

manufacturing

Version

ERPNext: v14.34.3 (HEAD)

Frappe Framework: v14.44.0 (HEAD)

Frappe HR: v14.10.0 (HEAD)

Payments: v0.0.1 (HEAD)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

request.js:457  Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 94, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1620, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/handler.py", line 306, in run_doc_method
    response = doc.run_method(method)
  File "apps/frappe/frappe/model/document.py", line 915, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1277, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1259, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 912, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/manufacturing/doctype/production_plan/production_plan.py", line 194, in get_items
    self.get_so_items()
  File "apps/erpnext/erpnext/manufacturing/doctype/production_plan/production_plan.py", line 294, in get_so_items
    self.add_items(items + packed_items)
  File "apps/erpnext/erpnext/manufacturing/doctype/production_plan/production_plan.py", line 350, in add_items
    item_details = get_item_details(data.item_code)
  File "apps/erpnext/erpnext/manufacturing/doctype/work_order/work_order.py", line 1119, in get_item_details
    frappe.throw(_("Default BOM for {0} not found").format(item))
  File "apps/frappe/frappe/__init__.py", line 534, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 502, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 451, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Default BOM for Centre Bolt 20X340 (H35X22)MM not found

(anonymous) @ request.js:457
@s-aga-r
Copy link
Contributor

s-aga-r commented Aug 18, 2023

closing this #35170

@s-aga-r s-aga-r closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants