refactor: add Docstrings for functions

This commit is contained in:
s-aga-r
2023-04-05 19:48:15 +05:30
parent 38e9367184
commit ac24d778e8
10 changed files with 253 additions and 168 deletions

View File

@@ -2784,16 +2784,16 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
parent.update_billing_percentage()
parent.set_status()
# Cancel and Recreate Stock Reservation Entries.
if parent_doctype == "Sales Order":
from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import (
cancel_stock_reservation_entries,
has_reserved_stock,
reserve_stock_against_sales_order,
)
if has_reserved_stock(parent.doctype, parent.name):
cancel_stock_reservation_entries(parent.doctype, parent.name)
reserve_stock_against_sales_order(parent.name)
parent.create_stock_reservation_entries()
@erpnext.allow_regional