[minor] remove hide_first in forms
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index db8ab02..d502a3d 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -3,7 +3,6 @@
frappe.ui.form.on("Supplier", {
before_load: function(frm) {
- frm.hide_first = true;
frappe.setup_language_field(frm);
},
refresh: function(frm) {
diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index a7198e3..8857bad 100755
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -4,7 +4,6 @@
frappe.provide("erpnext.hr");
erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
setup: function() {
- this.frm.hide_first = true;
this.frm.fields_dict.user_id.get_query = function(doc, cdt, cdn) {
return { query:"frappe.core.doctype.user.user.user_query"} }
this.frm.fields_dict.reports_to.get_query = function(doc, cdt, cdn) {
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index 6f0da36..5c1fb0d 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -3,8 +3,6 @@
frappe.ui.form.on("Project", {
onload: function(frm) {
- frm.hide_first = true;
-
var so = frappe.meta.get_docfield("Project", "sales_order");
so.get_route_options_for_new_doc = function(field) {
if(frm.is_new()) return;
@@ -46,7 +44,7 @@
}
frm.dashboard.show_dashboard();
- frm.dashboard.add_section(frappe.render_template('project_dashboard', {project: frm.doc}));
+ // frm.dashboard.add_section(frappe.render_template('project_dashboard', {project: frm.doc}));
// var bars = [];
// bars.push({
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 5645280..87d028f 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -3,7 +3,6 @@
frappe.ui.form.on("Customer", {
before_load: function(frm) {
- frm.hide_first = true;
frappe.setup_language_field(frm);
},
refresh: function(frm) {
diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js
index e7e89ce..99edb0f 100644
--- a/erpnext/stock/dashboard/item_dashboard.js
+++ b/erpnext/stock/dashboard/item_dashboard.js
@@ -160,17 +160,22 @@
});
});
- $('<p><a class="link-open">' + __("Add more items or open form") + '</a></p>')
+ $('<p style="margin-left: 10px;"><a class="link-open text-muted small">'
+ + __("Add more items or open full form") + '</a></p>')
.appendTo(dialog.body)
.find('.link-open')
.on('click', function() {
- var doc = frappe.new_doc('Stock Entry');
- doc.from_warehouse = dialog.get_value('source');
- doc.to_warehouse = dialog.get_value('target');
- row = frappe.model.add_child(doc, 'items');
- row.item_code = dialog.get_value('item_code');
- row.qty = dialog.get_value('qty');
- row.basic_rate = dialog.get_value('rate');
- frappe.set_route('Form', doc.doctype, doc.name);
+ frappe.model.with_doctype('Stock Entry', function() {
+ var doc = frappe.model.get_new_doc('Stock Entry');
+ doc.from_warehouse = dialog.get_value('source');
+ doc.to_warehouse = dialog.get_value('target');
+ row = frappe.model.add_child(doc, 'items');
+ row.item_code = dialog.get_value('item_code');
+ row.f_warehouse = dialog.get_value('target');
+ row.t_warehouse = dialog.get_value('target');
+ row.qty = dialog.get_value('qty');
+ row.basic_rate = dialog.get_value('rate');
+ frappe.set_route('Form', doc.doctype, doc.name);
+ })
});
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 050f583..6765a3c 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -6,7 +6,6 @@
frappe.ui.form.on("Item", {
onload: function(frm) {
- frm.hide_first = true;
erpnext.item.setup_queries(frm);
if (frm.doc.variant_of){
frm.fields_dict["attributes"].grid.set_column_disp("attribute_value", true);