Merge pull request #7276 from neilLasrado/develop
Allow Data Import for Student Guardian
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index b2b6aea..5290caf 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -297,6 +297,8 @@
this.print_template = r.message.print_template;
this.pos_profile_data = r.message.pos_profile;
this.default_customer = r.message.default_customer || null;
+ this.print_settings = locals[":Print Settings"]["Print Settings"];
+ this.letter_head = frappe.boot.letter_heads[this.pos_profile_data[letter_head]] || {};
},
save_previous_entry : function(){
@@ -327,9 +329,9 @@
frappe.meta.sync(data)
})
- this.print_template_data = frappe.render_template("print_template",
- {content: this.print_template, title:"POS",
- base_url: frappe.urllib.get_base_url(), print_css: frappe.boot.print_css})
+ this.print_template_data = frappe.render_template("print_template", {content: this.print_template,
+ title:"POS", base_url: frappe.urllib.get_base_url(), print_css: frappe.boot.print_css,
+ print_settings: this.print_settings, header: this.letter_head.header, footer: this.letter_head.footer})
},
setup: function(){
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js
index 0fca7dc..dc79d1f 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.js
+++ b/erpnext/accounts/report/general_ledger/general_ledger.js
@@ -80,13 +80,6 @@
"fieldname":"group_by_account",
"label": __("Group by Account"),
"fieldtype": "Check",
- },
- {
- "fieldname":"letter_head",
- "label": __("Letter Head"),
- "fieldtype": "Link",
- "options": "Letter Head",
- "default": frappe.defaults.get_default("letter_head"),
}
]
}
diff --git a/erpnext/hr/web_form/job_application/job_application.json b/erpnext/hr/web_form/job_application/job_application.json
index 2aa6520..a11a660 100644
--- a/erpnext/hr/web_form/job_application/job_application.json
+++ b/erpnext/hr/web_form/job_application/job_application.json
@@ -1,8 +1,13 @@
{
+ "accept_payment": 0,
"allow_comments": 1,
"allow_delete": 0,
"allow_edit": 1,
+ "allow_incomplete": 0,
"allow_multiple": 1,
+ "allow_print": 0,
+ "amount": 0.0,
+ "amount_based_on_field": 0,
"creation": "2016-09-10 02:53:16.598314",
"doc_type": "Job Applicant",
"docstatus": 0,
@@ -11,13 +16,16 @@
"introduction_text": "",
"is_standard": 1,
"login_required": 0,
- "modified": "2016-09-13 04:56:29.228762",
+ "max_attachment_size": 0,
+ "modified": "2016-12-20 00:21:44.081622",
"modified_by": "Administrator",
"module": "HR",
"name": "job-application",
"owner": "Administrator",
"published": 1,
"route": "job_application",
+ "show_sidebar": 1,
+ "sidebar_items": [],
"success_message": "Thank you for applying.",
"success_url": "/jobs",
"title": "Job Application",
@@ -27,6 +35,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Job Opening",
+ "max_length": 0,
+ "max_value": 0,
"options": "",
"read_only": 1,
"reqd": 0
@@ -36,6 +46,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Applicant Name",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 1
},
@@ -44,6 +56,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Email Id",
+ "max_length": 0,
+ "max_value": 0,
"options": "Email",
"read_only": 0,
"reqd": 1
@@ -53,6 +67,8 @@
"fieldtype": "Text",
"hidden": 0,
"label": "Cover Letter",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -61,6 +77,8 @@
"fieldtype": "Attach",
"hidden": 0,
"label": "Resume Attachment",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
}
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 2a27922..f4fed6e 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -87,7 +87,7 @@
for r in ret:
if not item.get(r):
item.set(r, ret[r])
-
+
self.validate_bom_currecny(item)
def get_bom_material_detail(self, args=None):
@@ -222,7 +222,7 @@
if not self.quantity:
frappe.throw(_("Quantity should be greater than 0"))
-
+
def validate_currency(self):
if self.rm_cost_as_per == 'Price List' and \
frappe.db.get_value('Price List', self.buying_price_list, 'currency') != self.currency:
@@ -320,7 +320,7 @@
for d in self.get('items'):
if d.bom_no:
d.rate = self.get_bom_unitcost(d.bom_no)
-
+
d.base_rate = d.rate * self.conversion_rate
d.amount = flt(d.rate, self.precision("rate", d)) * flt(d.qty, self.precision("qty", d))
d.base_amount = d.amount * self.conversion_rate
@@ -367,7 +367,7 @@
'qty' : flt(d.qty),
'rate' : d.base_rate,
}))
-
+
def company_currency(self):
return frappe.db.get_value('Company', self.company, 'default_currency')
@@ -498,12 +498,12 @@
frappe.throw(_("BOM {0} does not belong to Item {1}").format(bom_no, item))
@frappe.whitelist()
-def get_children(parent=None):
- if parent:
+def get_children():
+ if frappe.form_dict.parent:
return frappe.db.sql("""select item_code,
bom_no as value, qty,
if(ifnull(bom_no, "")!="", 1, 0) as expandable
from `tabBOM Item`
where parent=%s
order by idx
- """, parent, as_dict=True)
\ No newline at end of file
+ """, frappe.form_dict.parent, as_dict=True)
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom_item/bom_item.json b/erpnext/manufacturing/doctype/bom_item/bom_item.json
index bb55c73..2fc29a8 100644
--- a/erpnext/manufacturing/doctype/bom_item/bom_item.json
+++ b/erpnext/manufacturing/doctype/bom_item/bom_item.json
@@ -22,6 +22,7 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -32,6 +33,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -49,7 +51,8 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -58,6 +61,7 @@
"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,
@@ -76,6 +80,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -83,6 +88,7 @@
"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,
@@ -101,6 +107,7 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "BOM No",
"length": 0,
"no_copy": 0,
@@ -112,6 +119,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -131,6 +139,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -138,6 +147,7 @@
"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,
@@ -156,6 +166,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Description",
"length": 0,
"no_copy": 0,
@@ -166,6 +177,7 @@
"print_hide_if_no_value": 0,
"print_width": "250px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -185,12 +197,14 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -209,6 +223,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -217,6 +232,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -235,6 +251,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -244,6 +261,7 @@
"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,
@@ -262,6 +280,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
@@ -269,6 +288,7 @@
"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,
@@ -287,6 +307,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Qty",
"length": 0,
"no_copy": 0,
@@ -296,6 +317,7 @@
"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,
@@ -315,6 +337,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
@@ -323,6 +346,7 @@
"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,
@@ -341,6 +365,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -352,6 +377,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -371,12 +397,14 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -395,6 +423,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
@@ -405,6 +434,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -423,6 +453,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Basic Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -432,6 +463,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -450,6 +482,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -459,6 +492,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -477,6 +511,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -484,6 +519,7 @@
"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,
@@ -494,14 +530,15 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 0,
+ "columns": 1,
"fieldname": "scrap",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Scrap %",
"length": 0,
"no_copy": 0,
@@ -511,6 +548,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -529,6 +567,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Qty Consumed Per Unit",
"length": 0,
"no_copy": 0,
@@ -538,6 +577,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -555,8 +595,8 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-10-21 15:57:22.521537",
- "modified_by": "Administrator",
+ "modified": "2016-12-20 12:54:34.859076",
+ "modified_by": "rmehta@gmail.com",
"module": "Manufacturing",
"name": "BOM Item",
"owner": "Administrator",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index aad8d42..15cc842 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -358,3 +358,4 @@
erpnext.patches.v7_1.set_currency_exchange_date
erpnext.patches.v7_1.set_sales_person_status
erpnext.patches.v7_1.repost_stock_for_deleted_bins_for_merging_items
+execute:frappe.delete_doc('Desktop Icon', {'module_name': 'Profit and Loss Statment'})
diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py
index 97ef329..6e71769 100644
--- a/erpnext/startup/boot.py
+++ b/erpnext/startup/boot.py
@@ -13,8 +13,6 @@
bootinfo.website_settings = frappe.get_doc('Website Settings')
if frappe.session['user']!='Guest':
- bootinfo.letter_heads = get_letter_heads()
-
update_page_info(bootinfo)
load_country_and_currency(bootinfo)
@@ -42,12 +40,6 @@
number_format, smallest_currency_fraction_value, symbol from tabCurrency
where enabled=1""", as_dict=1, update={"doctype":":Currency"})
-def get_letter_heads():
- import frappe
- ret = frappe.db.sql("""select name, content from `tabLetter Head`
- where disabled=0""")
- return dict(ret)
-
def update_page_info(bootinfo):
bootinfo.page_info.update({
"Chart of Accounts": {