mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
Merge pull request #42816 from sagarvora/onload-tx
fix: ensure `SellingController.onload` gets called for SO & DN
This commit is contained in:
@@ -185,6 +185,8 @@ class SalesOrder(SellingController):
|
|||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
def onload(self) -> None:
|
def onload(self) -> None:
|
||||||
|
super().onload()
|
||||||
|
|
||||||
if frappe.db.get_single_value("Stock Settings", "enable_stock_reservation"):
|
if frappe.db.get_single_value("Stock Settings", "enable_stock_reservation"):
|
||||||
if self.has_unreserved_stock():
|
if self.has_unreserved_stock():
|
||||||
self.set_onload("has_unreserved_stock", True)
|
self.set_onload("has_unreserved_stock", True)
|
||||||
|
|||||||
@@ -209,6 +209,8 @@ class DeliveryNote(SellingController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def onload(self):
|
def onload(self):
|
||||||
|
super().onload()
|
||||||
|
|
||||||
if self.docstatus == 0:
|
if self.docstatus == 0:
|
||||||
self.set_onload("has_unpacked_items", self.has_unpacked_items())
|
self.set_onload("has_unpacked_items", self.has_unpacked_items())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user