[fix] minor for quick-entry
This commit is contained in:
parent
9904c5acf4
commit
3117b4b8d6
@ -39,7 +39,7 @@ erpnext.hr.ExpenseClaimController = frappe.ui.form.Controller.extend({
|
||||
d1.account_type = r.message.account_type;
|
||||
}
|
||||
|
||||
loaddoc('Journal Entry', jv.name);
|
||||
frappe.set_route('Form', 'Journal Entry', jv.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"bold": 1,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
@ -770,7 +770,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 5,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-25 05:27:03.346334",
|
||||
"modified": "2016-03-29 01:01:50.074252",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Task",
|
||||
|
@ -216,7 +216,7 @@ cur_frm.cscript.new_contact = function(){
|
||||
tn = frappe.model.make_new_doc_and_get_name('Contact');
|
||||
locals['Contact'][tn].is_customer = 1;
|
||||
if(doc.customer) locals['Contact'][tn].customer = doc.customer;
|
||||
loaddoc('Contact', tn);
|
||||
frappe.set_route('Form', 'Contact', tn);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
|
||||
|
@ -18,6 +18,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "General Settings",
|
||||
@ -25,6 +26,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -40,6 +42,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Item Group Name",
|
||||
@ -49,6 +52,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -58,13 +62,14 @@
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"bold": 1,
|
||||
"collapsible": 0,
|
||||
"description": "",
|
||||
"fieldname": "parent_item_group",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Parent Item Group",
|
||||
@ -75,6 +80,7 @@
|
||||
"options": "Item Group",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -91,6 +97,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Has Child Node",
|
||||
@ -101,6 +108,7 @@
|
||||
"options": "\nYes\nNo",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -116,12 +124,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -137,6 +147,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Income Account",
|
||||
@ -145,6 +156,7 @@
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -160,6 +172,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Expense Account",
|
||||
@ -168,6 +181,7 @@
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -183,6 +197,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Cost Center",
|
||||
@ -191,6 +206,7 @@
|
||||
"options": "Cost Center",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -206,6 +222,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website Settings",
|
||||
@ -213,6 +230,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -229,6 +247,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Show in Website",
|
||||
@ -236,6 +255,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -252,6 +272,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Page Name",
|
||||
@ -259,6 +280,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -275,6 +297,7 @@
|
||||
"fieldtype": "Read Only",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Parent Website Route",
|
||||
@ -283,6 +306,7 @@
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -300,6 +324,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Slideshow",
|
||||
@ -308,6 +333,7 @@
|
||||
"options": "Website Slideshow",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -325,6 +351,7 @@
|
||||
"fieldtype": "Text Editor",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Description",
|
||||
@ -332,6 +359,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -348,6 +376,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website Specifications",
|
||||
@ -356,6 +385,7 @@
|
||||
"options": "Item Website Specification",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -371,6 +401,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "lft",
|
||||
@ -380,6 +411,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -395,6 +427,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "rgt",
|
||||
@ -404,6 +437,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -420,6 +454,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "old_parent",
|
||||
@ -430,6 +465,7 @@
|
||||
"options": "Item Group",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@ -448,7 +484,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 3,
|
||||
"modified": "2015-11-16 06:29:48.316308",
|
||||
"modified": "2016-03-28 08:38:30.868523",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Item Group",
|
||||
@ -577,5 +613,7 @@
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "parent_item_group"
|
||||
"search_fields": "parent_item_group",
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
@ -122,7 +122,7 @@ cur_frm.cscript.new_contact = function(){
|
||||
tn = frappe.model.make_new_doc_and_get_name('Contact');
|
||||
locals['Contact'][tn].is_customer = 1;
|
||||
if(doc.customer) locals['Contact'][tn].customer = doc.customer;
|
||||
loaddoc('Contact', tn);
|
||||
frappe.set_route('Form', 'Contact', tn);
|
||||
}
|
||||
|
||||
|
||||
|
@ -246,7 +246,7 @@
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
@ -425,7 +425,7 @@
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
@ -2323,7 +2323,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 1,
|
||||
"modified": "2016-03-10 05:15:41.190950",
|
||||
"modified": "2016-03-28 08:29:07.922559",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item",
|
||||
@ -2494,5 +2494,6 @@
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "item_name,description,item_group,customer_code",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "item_name"
|
||||
"title_field": "item_name",
|
||||
"track_seen": 0
|
||||
}
|
@ -52,11 +52,14 @@ class Item(WebsiteGenerator):
|
||||
if self.is_sales_item=="Yes":
|
||||
self.publish_in_hub = 1
|
||||
|
||||
if not self.description:
|
||||
self.description = self.item_name
|
||||
|
||||
def validate(self):
|
||||
super(Item, self).validate()
|
||||
|
||||
if not self.stock_uom:
|
||||
msgprint(_("Please enter default Unit of Measure"), raise_exception=1)
|
||||
if not self.description:
|
||||
self.description = self.item_name
|
||||
|
||||
self.validate_uom()
|
||||
self.add_default_uom_in_conversion_factor_table()
|
||||
|
@ -181,7 +181,7 @@ cur_frm.cscript.new_contact = function() {
|
||||
locals['Contact'][tn].is_supplier = 1;
|
||||
if(doc.supplier)
|
||||
locals['Contact'][tn].supplier = doc.supplier;
|
||||
loaddoc('Contact', tn);
|
||||
frappe.set_route('Form', 'Contact', tn);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
|
||||
|
@ -180,7 +180,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
var excise = frappe.model.make_new_doc_and_get_name('Journal Entry');
|
||||
excise = locals['Journal Entry'][excise];
|
||||
excise.voucher_type = 'Excise Entry';
|
||||
loaddoc('Journal Entry', excise.name);
|
||||
frappe.set_route('Form', 'Journal Entry', excise.name);
|
||||
}, __("Make"));
|
||||
cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||
},
|
||||
|
@ -11,6 +11,9 @@ from frappe import _
|
||||
class FindItemBot(BotParser):
|
||||
def get_reply(self):
|
||||
if self.startswith('where is', 'find item', 'locate'):
|
||||
if not frappe.has_permission('Warehouse'):
|
||||
raise frappe.PermissionError
|
||||
|
||||
item = '%{0}%'.format(self.strip_words(self.query, 'where is', 'find item', 'locate'))
|
||||
items = frappe.db.sql('''select name from `tabItem` where item_code like %(txt)s
|
||||
or item_name like %(txt)s or description like %(txt)s''', dict(txt=item))
|
||||
|
Loading…
x
Reference in New Issue
Block a user