-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from RitvikSardana/develop-ritvik-patch-si-as…
…sessment-group fix: add patch for sales invoice permission and parent assessment group
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import frappe | ||
from education.install import create_parent_assessment_group | ||
|
||
|
||
def execute(): | ||
create_parent_assessment_group() |
18 changes: 18 additions & 0 deletions
18
education/patches/v15_0/student_role_permission_sales_invoice.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import frappe | ||
from frappe.permissions import add_permission, update_permission_property | ||
|
||
|
||
def execute(): | ||
|
||
add_permission("Sales Invoice", "Student", 0) | ||
|
||
doctype = "Sales Invoice" | ||
role = "Student" | ||
permlevel = 0 | ||
ptype = ["read", "write", "print"] | ||
|
||
for p in ptype: | ||
# update permissions | ||
update_permission_property(doctype, role, permlevel, p, 1) | ||
|
||
frappe.db.commit() |