fix: Attempt to fix status updater 1

This commit is contained in:
Mihir Kandoi
2025-01-02 14:25:37 +05:30
parent 5dacfd5cda
commit 87f1f6e15c
2 changed files with 10 additions and 10 deletions

View File

@@ -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",

View File

@@ -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}