Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions beams/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def after_install():
create_custom_fields(get_hd_ticket_custom_fields(),ignore_validate=True)
create_custom_fields(get_hd_ticket_type_custom_fields(),ignore_validate=True)
create_custom_fields(get_expense_claim_type_custom_fields(),ignore_validate=True)
create_custom_fields(get_supplier_quotation_custom_fields(), ignore_validate=True)


#Creating BEAMS specific Property Setters
Expand Down Expand Up @@ -132,6 +133,7 @@ def before_uninstall():
delete_custom_fields(get_hd_ticket_custom_fields())
delete_custom_fields(get_hd_ticket_type_custom_fields())
delete_custom_fields(get_expense_claim_type_custom_fields())
delete_custom_fields(get_supplier_quotation_custom_fields())


def delete_custom_fields(custom_fields: dict):
Expand Down Expand Up @@ -588,13 +590,19 @@ def get_customer_custom_fields():
"options":"\nMSME\nNon-MSME",
"insert_after": "customer_group"
},
{
"fieldname": "msme_number",
"fieldtype": "Int",
"label": "MSME Number",
"insert_after":"msme_status"
},
{
"fieldname": "region",
"fieldtype": "Link",
"label": "Region",
"options": "Region",
"reqd": 1,
"insert_after": "msme_status"
"insert_after": "msme_number"
},
{
"fieldname": "is_agent",
Expand Down Expand Up @@ -802,6 +810,12 @@ def get_purchase_order_custom_fields():
"no_copy":1,
"depends_on": "eval:doc.is_budget_exceed == 1"

},
{
"fieldname": "attach",
"fieldtype": "Attach",
"label": "Attachments",
"insert_after": "base_net_total"
}
],
"Purchase Order Item": [
Expand All @@ -819,7 +833,7 @@ def get_purchase_order_custom_fields():
"label": "Reference Document",
"options":"reference_doctype",
"insert_after": "reference_doctype"
}
}
]
}

Expand Down Expand Up @@ -1504,6 +1518,12 @@ def get_purchase_invoice_custom_fields():
"read_only": 1,
"options": "Bureau",
"insert_after": "supplier"
},
{
"fieldname": "attach",
"fieldtype": "Attach",
"label": "Attachments",
"insert_after": "base_net_total"
}
]
}
Expand Down Expand Up @@ -4690,4 +4710,19 @@ def get_expense_claim_type_custom_fields():
"insert_after": "deferred_expense_account"
}
]
}

def get_supplier_quotation_custom_fields():
'''
Custom fields that need to be added to the Supplier Quotation DocType
'''
return {
"Supplier Quotation": [
{
"fieldname": "attach",
"fieldtype": "Attach",
"label": "Attachments",
"insert_after": "base_net_total"
}
]
}