Skip to content

Commit

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

fix: validate sales order item with quotation (backport #37635)
  • Loading branch information
deepeshgarg007 authored Nov 1, 2023
2 parents 0196d7a + 4a225b0 commit f502ec2
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 @@ -204,7 +204,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 f502ec2

Please sign in to comment.