style: add comment

This commit is contained in:
Raffael Meyer 2022-01-24 16:07:48 +01:00 committed by GitHub
parent a62da8ddeb
commit c9946b2899
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -379,6 +379,8 @@ def get_labels(fields, doctype):
df = frappe.get_meta(parenttype).get_field(fieldname)
label = _(df.label if df else fieldname.title())
if parenttype != doctype:
# If the column is from a child table, append the child doctype.
# For example, "Item Code (Sales Invoice Item)".
label += " (" + _(parenttype) + ")"
labels.append(label)