Merge pull request #37822 from frappe/mergify/bp/version-15-hotfix/pr-37635

fix: validate sales order item with quotation (#37635)
This commit is contained in:
Deepesh Garg 2023-11-01 15:14:03 +05:30 committed by GitHub
commit c8c8c6533b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,7 +217,15 @@ class SalesOrder(SellingController):
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")):