From bbd718d98d4ed1d08b479a267e57d9b079f6093f Mon Sep 17 00:00:00 2001 From: Richard Case <64409021+casesolved-co-uk@users.noreply.github.com> Date: Thu, 26 Aug 2021 17:22:16 +0100 Subject: [PATCH] fix: Production Plan: load document defaults for plan items & remove name column from listview (#26584) (cherry picked from commit 69d88a921273c9e0ea29d7131232686a0be7bb78) # Conflicts: # erpnext/manufacturing/doctype/production_plan/production_plan.py # erpnext/manufacturing/doctype/production_plan/production_plan_list.js --- .../doctype/production_plan/production_plan.py | 14 ++++++++++++++ .../production_plan/production_plan_list.js | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 3f82a75d302..e3c6e7a803e 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -481,6 +481,7 @@ class ProductionPlan(Document): {"sales_order": data.parent, "sales_order_item": data.name, "qty": data.pending_qty} ) +<<<<<<< HEAD bom_no = data.bom_no or item_details and item_details.get("bom_no") or "" if not bom_no: continue @@ -499,6 +500,19 @@ class ProductionPlan(Document): "product_bundle_item": data.parent_item, }, ) +======= + pi = self.append('po_items', { + 'warehouse': data.warehouse, + 'item_code': data.item_code, + 'description': data.description or item_details.description, + 'stock_uom': item_details and item_details.stock_uom or '', + 'bom_no': item_details and item_details.bom_no or '', + 'planned_qty': data.pending_qty, + 'pending_qty': data.pending_qty, + 'planned_start_date': now_datetime(), + 'product_bundle_item': data.parent_item + }) +>>>>>>> 69d88a9212 (fix: Production Plan: load document defaults for plan items & remove name column from listview (#26584)) pi._set_defaults() if self.get_items_from == "Sales Order": diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan_list.js b/erpnext/manufacturing/doctype/production_plan/production_plan_list.js index bfef6e1220f..ba29bae9d57 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan_list.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan_list.js @@ -1,4 +1,8 @@ +<<<<<<< HEAD frappe.listview_settings["Production Plan"] = { +======= +frappe.listview_settings['Production Plan'] = { +>>>>>>> 69d88a9212 (fix: Production Plan: load document defaults for plan items & remove name column from listview (#26584)) hide_name_column: true, add_fields: ["status"], filters: [["status", "!=", "Closed"]],