From 87f1f6e15c5d5db5fc28a24bb89e2bac77c7af22 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 2 Jan 2025 14:25:37 +0530 Subject: [PATCH] fix: Attempt to fix status updater 1 --- .../doctype/purchase_order/purchase_order.py | 2 +- erpnext/controllers/status_updater.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 913c8c26f57..5ee650ead60 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -559,7 +559,7 @@ class PurchaseOrder(BuyingController): "source_dt": "Purchase Order Item", "target_dt": "Production Plan Sub Assembly Item", "join_field": "production_plan_sub_assembly_item", - "target_field": "ordered_qty", + "target_field": "received_qty", "target_parent_dt": "Production Plan", "target_parent_field": "", "target_ref_field": "qty", diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py index 4c0f7941b0c..88d2fca3c63 100644 --- a/erpnext/controllers/status_updater.py +++ b/erpnext/controllers/status_updater.py @@ -201,19 +201,19 @@ class StatusUpdater(Document): Get the status of the document. Returns: - dict: A dictionary containing the status. This allows callers to receive - a dictionary for efficient bulk updates, for example when `per_billed` - and other status fields also need to be updated. + dict: A dictionary containing the status. This allows callers to receive + a dictionary for efficient bulk updates, for example when `per_billed` + and other status fields also need to be updated. Note: - Can be overriden on a doctype to implement more localized status updater logic. + Can be overriden on a doctype to implement more localized status updater logic. Example: - { - "status": "Draft", - "per_billed": 50, - "billing_status": "Partly Billed" - } + { + "status": "Draft", + "per_billed": 50, + "billing_status": "Partly Billed" + } """ if self.doctype not in status_map: return {"status": self.status}