mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-11 10:55:09 +00:00
Co-authored-by: NaviN <118178330+Navin-S-R@users.noreply.github.com> fix(delivery note): avoid maintaining si_detail on return delivery note (#52456)
This commit is contained in:
@@ -531,7 +531,6 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None, return_agai
|
|||||||
target_doc.against_sales_order = source_doc.against_sales_order
|
target_doc.against_sales_order = source_doc.against_sales_order
|
||||||
target_doc.against_sales_invoice = source_doc.against_sales_invoice
|
target_doc.against_sales_invoice = source_doc.against_sales_invoice
|
||||||
target_doc.so_detail = source_doc.so_detail
|
target_doc.so_detail = source_doc.so_detail
|
||||||
target_doc.si_detail = source_doc.si_detail
|
|
||||||
target_doc.expense_account = source_doc.expense_account
|
target_doc.expense_account = source_doc.expense_account
|
||||||
target_doc.dn_detail = source_doc.name
|
target_doc.dn_detail = source_doc.name
|
||||||
if default_warehouse_for_sales_return:
|
if default_warehouse_for_sales_return:
|
||||||
|
|||||||
@@ -393,6 +393,9 @@ class DeliveryNote(SellingController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def validate_sales_invoice_references(self):
|
def validate_sales_invoice_references(self):
|
||||||
|
if self.is_return:
|
||||||
|
return
|
||||||
|
|
||||||
self._validate_dependent_item_fields(
|
self._validate_dependent_item_fields(
|
||||||
"against_sales_invoice", "si_detail", _("References to Sales Invoices are Incomplete")
|
"against_sales_invoice", "si_detail", _("References to Sales Invoices are Incomplete")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user