fix: update rfq item in postprocess
This commit is contained in:
parent
a1b5d57076
commit
979ad180fa
@ -267,11 +267,8 @@ def make_quotation(source_name, target_doc=None):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_request_for_quotation(source_name, target_doc=None):
|
def make_request_for_quotation(source_name, target_doc=None):
|
||||||
def set_missing_values(source, target):
|
def update_item(obj, target, source_parent):
|
||||||
rfq = frappe.get_doc(target)
|
target.conversion_factor = 1.0
|
||||||
for item in rfq.items:
|
|
||||||
# opportunity item is not multi-uom
|
|
||||||
item.conversion_factor = 1.0
|
|
||||||
|
|
||||||
doclist = get_mapped_doc("Opportunity", source_name, {
|
doclist = get_mapped_doc("Opportunity", source_name, {
|
||||||
"Opportunity": {
|
"Opportunity": {
|
||||||
@ -283,9 +280,10 @@ def make_request_for_quotation(source_name, target_doc=None):
|
|||||||
["name", "opportunity_item"],
|
["name", "opportunity_item"],
|
||||||
["parent", "opportunity"],
|
["parent", "opportunity"],
|
||||||
["uom", "uom"]
|
["uom", "uom"]
|
||||||
]
|
],
|
||||||
|
"postprocess": update_item
|
||||||
}
|
}
|
||||||
}, target_doc, set_missing_values)
|
}, target_doc)
|
||||||
|
|
||||||
return doclist
|
return doclist
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user