From e87a076f1d2da5f0691e10f7b7da84a6f41bad13 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 5 Oct 2017 12:20:20 +0530 Subject: [PATCH 1/4] Update link in the pos for offline and online mode from pos settings (#11061) --- .../accounts/doctype/pos_settings/pos_settings.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.py b/erpnext/accounts/doctype/pos_settings/pos_settings.py index 736d36eea9..13a50042fb 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.py +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.py @@ -3,7 +3,17 @@ # For license information, please see license.txt from __future__ import unicode_literals +import frappe from frappe.model.document import Document class POSSettings(Document): - pass \ No newline at end of file + def validate(self): + self.set_link_for_pos() + + def set_link_for_pos(self): + link = 'pos' if self.use_pos_in_offline_mode else 'point-of-sale' + desktop_icon = frappe.db.get_value('Desktop Icon', + {'standard': 1, 'module_name': 'POS'}, 'name') + + if desktop_icon: + frappe.db.set_value('Desktop Icon', desktop_icon, 'link', link) \ No newline at end of file From 7d4fd35aa3604e2195adb0a1079184f151e57884 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Oct 2017 12:20:33 +0530 Subject: [PATCH 2/4] Add POS Settings link in Accounts module (#11060) --- erpnext/config/accounts.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index 7c0f540154..cdce13ba35 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -315,11 +315,16 @@ def get_data(): "name": "Payment Gateway Account", "description": _("Setup Gateway accounts.") }, + { + "type": "doctype", + "name": "POS Settings", + "description": _("Setup mode of POS (Online / Offline)") + }, { "type": "doctype", "name": "POS Profile", "label": _("Point-of-Sale Profile"), - "description": _("Rules to calculate shipping amount for a sale") + "description": _("Setup default values for POS Invoices") }, { "type": "doctype", From f7a856b913d2eeb1b9ddd9f84dad7a26be17cde1 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 5 Oct 2017 13:31:29 +0530 Subject: [PATCH 3/4] [Fix] Rate not fetched in the POS, User trying to add an item in the cart before loading of frm --- erpnext/selling/page/point_of_sale/point_of_sale.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 1b0b9eb392..726e80f28d 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -49,11 +49,12 @@ erpnext.pos.PointOfSale = class PointOfSale { this.set_online_status(); }, () => this.setup_pos_profile(), + () => this.make_new_invoice(), () => { + frappe.timeout(1); this.make_items(); this.bind_events(); }, - () => this.make_new_invoice(), () => this.page.set_title(__('Point of Sale')) ]); } From 8c3d19e2ab6b52dba70764750cd49f2e14399a1a Mon Sep 17 00:00:00 2001 From: mbauskar Date: Thu, 5 Oct 2017 14:06:49 +0600 Subject: [PATCH 4/4] bumped to version 9.1.1 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 55628cc676..259c0f0549 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.1.0' +__version__ = '9.1.1' def get_default_company(user=None): '''Get default company for user'''