docs: explain make_sl_entries arguments

(cherry picked from commit eb8495a401)
This commit is contained in:
Ankush Menat
2022-03-02 12:01:51 +05:30
committed by Ankush Menat
parent 5ebfb65b42
commit 5be64c2b7f

View File

@@ -25,6 +25,16 @@ class SerialNoExistsInFutureTransaction(frappe.ValidationError):
def make_sl_entries(sl_entries, allow_negative_stock=False, via_landed_cost_voucher=False):
""" Create SL entries from SL entry dicts
args:
- allow_negative_stock: disable negative stock valiations if true
- via_landed_cost_voucher: landed cost voucher cancels and reposts
entries of purchase document. This flag is used to identify if
cancellation and repost is happening via landed cost voucher, in
such cases certain validations need to be ignored (like negative
stock)
"""
from erpnext.controllers.stock_controller import future_sle_exists
if sl_entries:
cancel = sl_entries[0].get("is_cancelled")