feat: Terms and Conditions section in Blanket Order (#17991)

This commit is contained in:
KanchanChauhan 2019-06-28 12:54:12 +05:30 committed by Nabin Hait
parent dbe9a41389
commit 2433fb1596
2 changed files with 145 additions and 473 deletions

View File

@ -35,5 +35,13 @@ frappe.ui.form.on('Blanket Order', {
onload_post_render: function(frm) { onload_post_render: function(frm) {
frm.get_field("items").grid.set_multiple_add("item_code", "qty"); frm.get_field("items").grid.set_multiple_add("item_code", "qty");
} },
tc_name: function (frm) {
erpnext.utils.get_terms(frm.doc.tc_name, frm.doc, function (r) {
if (!r.exc) {
frm.set_value("terms", r.message);
}
});
},
}); });

View File

@ -1,493 +1,157 @@
{ {
"allow_copy": 0, "autoname": "naming_series:",
"allow_guest_to_view": 0, "creation": "2018-05-24 07:18:08.256060",
"allow_import": 0, "doctype": "DocType",
"allow_rename": 0, "editable_grid": 1,
"autoname": "naming_series:", "engine": "InnoDB",
"beta": 0, "field_order": [
"creation": "2018-05-24 07:18:08.256060", "naming_series",
"custom": 0, "blanket_order_type",
"docstatus": 0, "customer",
"doctype": "DocType", "customer_name",
"document_type": "", "supplier",
"editable_grid": 1, "supplier_name",
"engine": "InnoDB", "column_break_8",
"from_date",
"to_date",
"company",
"section_break_12",
"items",
"amended_from",
"terms_and_conditions_section",
"tc_name",
"terms"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "naming_series",
"allow_in_quick_entry": 0, "fieldtype": "Select",
"allow_on_submit": 0, "label": "Series",
"bold": 0, "options": "MFG-BLR-.YYYY.-",
"collapsible": 0, "reqd": 1
"columns": 0, },
"default": "",
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "MFG-BLR-.YYYY.-",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "blanket_order_type",
"allow_in_quick_entry": 0, "fieldtype": "Select",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Order Type",
"collapsible": 0, "options": "\nSelling\nPurchasing",
"columns": 0, "reqd": 1
"fieldname": "blanket_order_type", },
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Order Type",
"length": 0,
"no_copy": 0,
"options": "\nSelling\nPurchasing",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.blanket_order_type == \"Selling\"",
"allow_in_quick_entry": 0, "fieldname": "customer",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Customer",
"collapsible": 0, "options": "Customer"
"columns": 0, },
"depends_on": "eval:doc.blanket_order_type == \"Selling\"",
"fieldname": "customer",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
"options": "Customer",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.blanket_order_type == \"Selling\"",
"allow_in_quick_entry": 0, "fetch_from": "customer.customer_name",
"allow_on_submit": 0, "fieldname": "customer_name",
"bold": 0, "fieldtype": "Data",
"collapsible": 0, "label": "Customer Name",
"columns": 0, "read_only": 1
"depends_on": "eval:doc.blanket_order_type == \"Selling\"", },
"fetch_from": "customer.customer_name",
"fieldname": "customer_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.blanket_order_type == \"Purchasing\"",
"allow_in_quick_entry": 0, "fieldname": "supplier",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Supplier",
"collapsible": 0, "options": "Supplier"
"columns": 0, },
"depends_on": "eval:doc.blanket_order_type == \"Purchasing\"",
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
"length": 0,
"no_copy": 0,
"options": "Supplier",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.blanket_order_type == \"Purchasing\"",
"allow_in_quick_entry": 0, "fetch_from": "supplier.supplier_name",
"allow_on_submit": 0, "fieldname": "supplier_name",
"bold": 0, "fieldtype": "Data",
"collapsible": 0, "label": "Supplier Name",
"columns": 0, "read_only": 1
"depends_on": "eval:doc.blanket_order_type == \"Purchasing\"", },
"fetch_from": "supplier.supplier_name",
"fieldname": "supplier_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_8",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "from_date",
"allow_in_quick_entry": 0, "fieldtype": "Date",
"allow_on_submit": 0, "label": "From Date",
"bold": 0, "reqd": 1
"collapsible": 0, },
"columns": 0,
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "to_date",
"allow_in_quick_entry": 0, "fieldtype": "Date",
"allow_on_submit": 0, "label": "To Date",
"bold": 0, "reqd": 1
"collapsible": 0, },
"columns": 0,
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "company",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Company",
"bold": 0, "options": "Company"
"collapsible": 0, },
"columns": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "section_break_12",
"allow_in_quick_entry": 0, "fieldtype": "Section Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_12",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "items",
"allow_in_quick_entry": 0, "fieldtype": "Table",
"allow_on_submit": 0, "label": "Item",
"bold": 0, "options": "Blanket Order Item",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fieldname": "items",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item",
"length": 0,
"no_copy": 0,
"options": "Blanket Order Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "amended_from",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Amended From",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Blanket Order",
"columns": 0, "print_hide": 1,
"fieldname": "amended_from", "read_only": 1
"fieldtype": "Link", },
"hidden": 0, {
"ignore_user_permissions": 0, "fieldname": "terms_and_conditions_section",
"ignore_xss_filter": 0, "fieldtype": "Section Break",
"in_filter": 0, "label": "Terms and Conditions"
"in_global_search": 0, },
"in_list_view": 0, {
"in_standard_filter": 0, "fieldname": "tc_name",
"label": "Amended From", "fieldtype": "Link",
"length": 0, "label": "Terms",
"no_copy": 1, "options": "Terms and Conditions"
"options": "Blanket Order", },
"permlevel": 0, {
"print_hide": 1, "fieldname": "terms",
"print_hide_if_no_value": 0, "fieldtype": "Text Editor",
"read_only": 1, "label": "Terms and Conditions Details"
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "is_submittable": 1,
"hide_heading": 0, "modified": "2019-06-19 11:59:09.279607",
"hide_toolbar": 0, "modified_by": "Administrator",
"idx": 0, "module": "Manufacturing",
"image_view": 0, "name": "Blanket Order",
"in_create": 0, "owner": "Administrator",
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-21 14:44:28.347534",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Blanket Order",
"name_case": "",
"owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0, "cancel": 1,
"cancel": 1, "create": 1,
"create": 1, "delete": 1,
"delete": 1, "email": 1,
"email": 1, "export": 1,
"export": 1, "print": 1,
"if_owner": 0, "read": 1,
"import": 0, "report": 1,
"permlevel": 0, "role": "System Manager",
"print": 1, "share": 1,
"read": 1, "submit": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
} }
], ],
"quick_entry": 1, "quick_entry": 1,
"read_only": 0, "search_fields": "blanket_order_type, to_date",
"read_only_onload": 0, "sort_field": "modified",
"search_fields": "blanket_order_type, to_date", "sort_order": "DESC",
"show_name_in_global_search": 0, "track_changes": 1
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
} }