[fix] ignore share permission while creating events on the background

This commit is contained in:
Nabin Hait
2015-05-21 16:51:15 +05:30
parent 4888a5dc0d
commit 3b0adc5246
2 changed files with 3 additions and 2 deletions

View File

@@ -114,7 +114,7 @@ def get_data():
{ {
"type": "doctype", "type": "doctype",
"name": "POS Profile", "name": "POS Profile",
"label": _("Point-of-Sale Setting"), "label": _("Point-of-Sale Profile"),
"description": _("Rules to calculate shipping amount for a sale") "description": _("Rules to calculate shipping amount for a sale")
}, },
{ {

View File

@@ -51,7 +51,8 @@ class TransactionBase(StatusUpdater):
event.insert(ignore_permissions=True) event.insert(ignore_permissions=True)
if frappe.db.exists("User", self.contact_by): 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): def validate_uom_is_integer(self, uom_field, qty_fields):
validate_uom_is_integer(self, uom_field, qty_fields) validate_uom_is_integer(self, uom_field, qty_fields)