From 3b0adc5246950575216d8104d2035a3bedc1dad9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 21 May 2015 16:51:15 +0530 Subject: [PATCH] [fix] ignore share permission while creating events on the background --- erpnext/config/accounts.py | 2 +- erpnext/utilities/transaction_base.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index 1b29002257a..a5a40242157 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -114,7 +114,7 @@ def get_data(): { "type": "doctype", "name": "POS Profile", - "label": _("Point-of-Sale Setting"), + "label": _("Point-of-Sale Profile"), "description": _("Rules to calculate shipping amount for a sale") }, { diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index 9c73c60b146..60889c54155 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -51,7 +51,8 @@ class TransactionBase(StatusUpdater): event.insert(ignore_permissions=True) if frappe.db.exists("User", self.contact_by): - frappe.share.add("Event", event.name, self.contact_by) + frappe.share.add("Event", event.name, self.contact_by, + flags={"ignore_share_permission": True}) def validate_uom_is_integer(self, uom_field, qty_fields): validate_uom_is_integer(self, uom_field, qty_fields)