[fix] minor fixes to pos

This commit is contained in:
Rushabh Mehta 2016-05-20 12:54:44 +05:30
parent 40b3a5bcc4
commit d0cee1b61b
5 changed files with 101 additions and 142 deletions

View File

@ -2,6 +2,7 @@
"allow_copy": 0, "allow_copy": 0,
"allow_import": 0, "allow_import": 0,
"allow_rename": 0, "allow_rename": 0,
"beta": 0,
"creation": "2014-08-29 16:02:39.740505", "creation": "2014-08-29 16:02:39.740505",
"custom": 0, "custom": 0,
"docstatus": 0, "docstatus": 0,
@ -16,6 +17,7 @@
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Company", "label": "Company",
@ -24,6 +26,7 @@
"options": "Company", "options": "Company",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
@ -31,29 +34,6 @@
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "50%"
},
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
@ -62,6 +42,7 @@
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Account", "label": "Account",
@ -70,6 +51,7 @@
"options": "Account", "options": "Account",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 1, "reqd": 1,
@ -80,21 +62,24 @@
], ],
"hide_heading": 0, "hide_heading": 0,
"hide_toolbar": 0, "hide_toolbar": 0,
"idx": 0,
"in_create": 0, "in_create": 0,
"in_dialog": 0, "in_dialog": 0,
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"max_attachments": 0, "max_attachments": 0,
"modified": "2015-11-16 06:29:51.450360", "modified": "2016-05-20 11:47:16.625828",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Party Account", "name": "Party Account",
"name_case": "", "name_case": "",
"owner": "Administrator", "owner": "Administrator",
"permissions": [], "permissions": [],
"quick_entry": 1,
"read_only": 0, "read_only": 0,
"read_only_onload": 0, "read_only_onload": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC" "sort_order": "DESC",
"track_seen": 0
} }

View File

@ -19,7 +19,7 @@ def get_pos_data():
if pos_profile.get('name'): if pos_profile.get('name'):
pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name')) pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name'))
else: else:
frappe.msgprint(_("Warning Message: Create pos profile")) frappe.msgprint(_("Warning Message: Create POS Profile"))
update_pos_profile_data(doc, pos_profile) update_pos_profile_data(doc, pos_profile)
update_multi_mode_option(doc, pos_profile) update_multi_mode_option(doc, pos_profile)

View File

@ -72,7 +72,11 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
make_menu_list: function(){ make_menu_list: function(){
var me = this; var me = this;
this.page.add_menu_item(__("Unsync Records"), function(){ this.page.add_menu_item(__("New Sales Invoice"), function() {
me.create_new()
})
this.page.add_menu_item(__("View Offline Records"), function(){
me.show_unsync_invoice_list() me.show_unsync_invoice_list()
}); });
@ -84,9 +88,9 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
}) })
}); });
this.page.add_menu_item(__("New Sales Invoice"), function() { this.page.add_menu_item(__("POS Profile"), function() {
me.create_new() frappe.set_route('POS Profile');
}) });
}, },
show_unsync_invoice_list: function(){ show_unsync_invoice_list: function(){
@ -285,8 +289,9 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
var me = this; var me = this;
key = key.toLowerCase() key = key.toLowerCase()
return $.grep(this.customers, function(data) { return $.grep(this.customers, function(data) {
if(data.name.toLowerCase().match(key) || data.customer_name.toLowerCase().match(key) if(data.name.toLowerCase().match(key)
|| data.customer_group.toLowerCase().match(key)){ || data.customer_name.toLowerCase().match(key)
|| (data.customer_group && data.customer_group.toLowerCase().match(key))){
return data return data
} }
}) })

View File

@ -2,10 +2,12 @@
"allow_copy": 0, "allow_copy": 0,
"allow_import": 0, "allow_import": 0,
"allow_rename": 0, "allow_rename": 0,
"beta": 0,
"creation": "2013-04-19 13:30:51", "creation": "2013-04-19 13:30:51",
"custom": 0, "custom": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Setup",
"fields": [ "fields": [
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
@ -15,6 +17,7 @@
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1, "in_filter": 1,
"in_list_view": 1, "in_list_view": 1,
"label": "Sales Person", "label": "Sales Person",
@ -25,6 +28,7 @@
"options": "Sales Person", "options": "Sales Person",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "200px", "print_width": "200px",
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
@ -42,6 +46,7 @@
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Contact No.", "label": "Contact No.",
@ -51,6 +56,7 @@
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "100px", "print_width": "100px",
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
@ -60,27 +66,6 @@
"unique": 0, "unique": 0,
"width": "100px" "width": "100px"
}, },
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_on_submit": 1, "allow_on_submit": 1,
"bold": 0, "bold": 0,
@ -89,6 +74,7 @@
"fieldtype": "Float", "fieldtype": "Float",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Contribution (%)", "label": "Contribution (%)",
@ -98,6 +84,7 @@
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "100px", "print_width": "100px",
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
@ -115,6 +102,7 @@
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Contribution to Net Total", "label": "Contribution to Net Total",
@ -125,6 +113,7 @@
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "120px", "print_width": "120px",
"read_only": 1, "read_only": 1,
"report_hide": 0, "report_hide": 0,
@ -142,6 +131,7 @@
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_list_view": 1, "in_list_view": 1,
"label": "Incentives", "label": "Incentives",
@ -152,36 +142,13 @@
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"unique": 0 "unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "parenttype",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Parenttype",
"length": 0,
"no_copy": 0,
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
"unique": 0
} }
], ],
"hide_heading": 0, "hide_heading": 0,
@ -193,12 +160,14 @@
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"max_attachments": 0, "max_attachments": 0,
"modified": "2015-11-16 06:29:57.395852", "modified": "2016-05-20 11:48:34.343879",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Team", "name": "Sales Team",
"owner": "Administrator", "owner": "Administrator",
"permissions": [], "permissions": [],
"quick_entry": 1,
"read_only": 0, "read_only": 0,
"read_only_onload": 0 "read_only_onload": 0,
"track_seen": 0
} }

View File

@ -43,7 +43,7 @@ domains = {
}, },
'Services': { 'Services': {
'desktop_icons': ['Project', 'Time Log', 'Customer', 'Sales Invoice', 'Lead', 'Opportunity', 'desktop_icons': ['Project', 'Time Log', 'Customer', 'Sales Order', 'Sales Invoice', 'Lead', 'Opportunity',
'Expense Claim', 'Employee', 'HR'], 'Expense Claim', 'Employee', 'HR'],
'remove_roles': ['Manufacturing User', 'Manufacturing Manager'], 'remove_roles': ['Manufacturing User', 'Manufacturing Manager'],
'properties': [ 'properties': [