Version 6.x.x Source
Single

### Fields

Sr | Fieldname | Type | Label | Options
--- | --- | --- | --- | ---
1 | `select_sales_orders` | Section Break | Select Sales Orders Select Sales Orders from which you want to create Production Orders. |
2 | `column_break0` | Column Break |  |
3 | `fg_item` | Link | Filter based on item | Item
4 | `customer` | Link | Filter based on customer | Customer
5 | `company` | Link | Company | Company
6 | `column_break1` | Column Break |  |
7 | `from_date` | Date | From Date |
8 | `to_date` | Date | To Date |
9 | `section_break1` | Section Break |  |
    Simple
10 | `get_sales_orders` | Button | Get Sales Orders Pull sales orders (pending to deliver) based on the above criteria |
    get_open_sales_orders
11 | `sales_orders` | Table | Sales Orders | Production Plan Sales Order
12 | `items_for_production` | Section Break | Select Items |
13 | `get_items_from_so` | Button | Get Items From Sales Orders |
    get_items_from_so
14 | `use_multi_level_bom` | Check | Use Multi-Level BOM If checked, BOM for sub-assembly items will be considered for getting raw materials. Otherwise, all sub-assembly items will be treated as a raw material. |
15 | `items` | Table | Items | Production Plan Item
16 | `create_production_orders` | Section Break | Production Orders Enter items and planned qty for which you want to raise production orders or download raw materials for analysis. |
17 | `raise_production_order` | Button | Create Production Orders Separate production order will be created for each finished good item. |
    raise_production_order
18 | `sb5` | Section Break | Material Requirement |
19 | `purchase_request_for_warehouse` | Link | Material Request For Warehouse | Warehouse
20 | `raise_purchase_request` | Button | Create Material Requests Items to be requested which are "Out of Stock" considering all warehouses based on projected qty and minimum order qty |
21 | `download_materials_required` | Button | Download Materials Required Download a report containing all raw materials with their latest inventory status |

### Controller

#### erpnext.manufacturing.doctype.production_planning_tool.production_planning_tool

### Class ProductionPlanningTool

Inherits from frappe.model.document.Document

__init__ (self, arg1, arg2=None)

No docs

add_items (self, items)

No docs

add_so_in_table (self, open_so)

Add sales orders in the table

clear_item_table (self)

No docs

clear_so_table (self)

No docs

create_production_order (self, items)

Create production order. Called from Production Planning Tool

download_raw_materials (self)

Create csv data for required raw material to produce finished goods

get_csv (self)

No docs

get_distinct_items_and_boms (self)

Club similar BOM and item for processing bomdict { bomno: ['sales_order', 'qty'] }

get_item_details (self, item_code)

No docs

get_items (self)

No docs

get_items_from_so (self)

Pull items from Sales Order, only proction item and subcontracted item will be pulled from Packing item and add items in the table

get_open_sales_orders (self)

Pull sales orders which are pending to deliver based on criteria selected

get_projected_qty (self)

No docs

get_raw_materials (self, bom_dict)

Get raw materials considering sub-assembly items { "itemcode": [qtyrequired, description, stockuom, minorder_qty] }

get_requested_items (self)

No docs

get_so_details (self, so)

Pull other details from so

insert_purchase_request (self)

No docs

make_items_dict (self, item_list)

No docs

raise_production_order (self)

It will raise production order (Draft) for all distinct FG items

raise_purchase_request (self)

Raise Material Request if projected qty is less than qty required Requested qty should be shortage qty considering minimum order qty

validate_company (self)

No docs

validate_data (self)

No docs