Merge pull request #31951 from rohitwaghchaure/maintenance-visit-issue

fix: Purposes not set in Maintenance Visit
This commit is contained in:
rohitwaghchaure 2022-08-25 10:48:41 +05:30 committed by GitHub
commit 1af22e5312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,7 +415,7 @@ def make_maintenance_visit(source_name, target_doc=None, item_name=None, s_id=No
}, },
"Maintenance Schedule Item": { "Maintenance Schedule Item": {
"doctype": "Maintenance Visit Purpose", "doctype": "Maintenance Visit Purpose",
"condition": lambda doc: doc.item_name == item_name, "condition": lambda doc: doc.item_name == item_name if item_name else True,
"field_map": {"sales_person": "service_person"}, "field_map": {"sales_person": "service_person"},
"postprocess": update_serial, "postprocess": update_serial,
}, },