Merge pull request #3316 from nabinhait/develop

share permission and patch fix
This commit is contained in:
Nabin Hait 2015-05-22 11:51:49 +05:30
commit fc79e205f0
3 changed files with 15 additions and 13 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

@ -19,6 +19,7 @@ def create_receivable_payable_account():
receivable_payable_accounts = frappe._dict() receivable_payable_accounts = frappe._dict()
def _create_account(args): def _create_account(args):
if args["parent_account"]:
account_id = frappe.db.get_value("Account", account_id = frappe.db.get_value("Account",
{"account_name": args["account_name"], "company": args["company"]}) {"account_name": args["account_name"], "company": args["company"]})
if not account_id: if not account_id:

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)