mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
Merge pull request #43971 from ruthra-kumar/additional_changes_to_advance_ledger
refactor: update permission requirement for advance ledger
This commit is contained in:
@@ -70,25 +70,41 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"in_create": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-10-16 17:11:28.143979",
|
"modified": "2024-11-05 10:31:28.736671",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Advance Payment Ledger Entry",
|
"name": "Advance Payment Ledger Entry",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"create": 1,
|
|
||||||
"delete": 1,
|
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "System Manager",
|
"role": "Accounts User",
|
||||||
"share": 1,
|
"share": 1
|
||||||
"write": 1
|
},
|
||||||
|
{
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Accounts Manager",
|
||||||
|
"share": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Auditor",
|
||||||
|
"share": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sort_field": "creation",
|
"sort_field": "creation",
|
||||||
|
|||||||
@@ -2616,6 +2616,7 @@ class AccountsController(TransactionBase):
|
|||||||
doc.amount = amount if self.docstatus == 1 else -1 * amount
|
doc.amount = amount if self.docstatus == 1 else -1 * amount
|
||||||
doc.event = "Submit" if self.docstatus == 1 else "Cancel"
|
doc.event = "Submit" if self.docstatus == 1 else "Cancel"
|
||||||
doc.currency = x.account_currency
|
doc.currency = x.account_currency
|
||||||
|
doc.flags.ignore_permissions = 1
|
||||||
doc.save()
|
doc.save()
|
||||||
|
|
||||||
def make_advance_payment_ledger_for_payment(self):
|
def make_advance_payment_ledger_for_payment(self):
|
||||||
@@ -2638,6 +2639,7 @@ class AccountsController(TransactionBase):
|
|||||||
doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount
|
doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount
|
||||||
doc.currency = currency
|
doc.currency = currency
|
||||||
doc.event = "Submit" if self.docstatus == 1 else "Cancel"
|
doc.event = "Submit" if self.docstatus == 1 else "Cancel"
|
||||||
|
doc.flags.ignore_permissions = 1
|
||||||
doc.save()
|
doc.save()
|
||||||
|
|
||||||
def make_advance_payment_ledger_entries(self):
|
def make_advance_payment_ledger_entries(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user