mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
model_wrapper is now bean, refactoring defaults
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import webnotes
|
||||
def execute():
|
||||
for name in webnotes.conn.sql("""select name from `tabHoliday List`"""):
|
||||
holiday_list_wrapper = webnotes.model_wrapper("Holiday List", name[0])
|
||||
holiday_list_wrapper = webnotes.bean("Holiday List", name[0])
|
||||
|
||||
desc_count = _count([d.description for d in
|
||||
holiday_list_wrapper.doclist.get({"doctype": "Holiday"})])
|
||||
|
||||
@@ -5,7 +5,7 @@ def execute():
|
||||
webnotes.conn.sql("""update tabDocPerm set report = 0 where parent = %s""", dt[0])
|
||||
|
||||
|
||||
doctype = webnotes.model_wrapper("DocType", dt[0])
|
||||
doctype = webnotes.bean("DocType", dt[0])
|
||||
for pl in [1, 2, 3]:
|
||||
if not doctype.doclist.get({"doctype": "DocField", "permlevel": pl}):
|
||||
if doctype.doclist.get({"doctype":"DocPerm", "permlevel":pl}):
|
||||
|
||||
@@ -23,7 +23,7 @@ def move_remarks_to_comments():
|
||||
where ifnull(remark, '')!=''""")
|
||||
fullname_map = {}
|
||||
for reco, remark, modified_by in result:
|
||||
webnotes.model_wrapper([{
|
||||
webnotes.bean([{
|
||||
"doctype": "Comment",
|
||||
"comment": remark,
|
||||
"comment_by": modified_by,
|
||||
|
||||
Reference in New Issue
Block a user