fix: Map only non alternative items from Quotation in Sales Invoice

- Since there's no item selection, only Quotation selection :/
This commit is contained in:
marination 2023-02-20 21:17:43 +05:30
parent 19456127cf
commit 6b789e2f04

View File

@ -396,7 +396,11 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
source_name, source_name,
{ {
"Quotation": {"doctype": "Sales Invoice", "validation": {"docstatus": ["=", 1]}}, "Quotation": {"doctype": "Sales Invoice", "validation": {"docstatus": ["=", 1]}},
"Quotation Item": {"doctype": "Sales Invoice Item", "postprocess": update_item}, "Quotation Item": {
"doctype": "Sales Invoice Item",
"postprocess": update_item,
"condition": lambda row: not row.is_alternative,
},
"Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True},
"Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True},
}, },