Skip to content

Commit

Permalink
Merge pull request #37822 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-37635

fix: validate sales order item with quotation (#37635)
  • Loading branch information
deepeshgarg007 authored Nov 1, 2023
2 parents 2ba5bb8 + 71538cf commit c8c8c65
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion erpnext/selling/doctype/sales_order/sales_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,15 @@ def validate_warehouse(self):

def validate_with_previous_doc(self):
super(SalesOrder, self).validate_with_previous_doc(
{"Quotation": {"ref_dn_field": "prevdoc_docname", "compare_fields": [["company", "="]]}}
{
"Quotation": {"ref_dn_field": "prevdoc_docname", "compare_fields": [["company", "="]]},
"Quotation Item": {
"ref_dn_field": "quotation_item",
"compare_fields": [["item_code", "="], ["uom", "="], ["conversion_factor", "="]],
"is_child_table": True,
"allow_duplicate_prev_row_id": True,
},
}
)

if cint(frappe.db.get_single_value("Selling Settings", "maintain_same_sales_rate")):
Expand Down

0 comments on commit c8c8c65

Please sign in to comment.