浏览代码

[minor] set default script_type for Custom Script

version-14
Rushabh Mehta 9 年前
父节点
当前提交
2810d6fdab
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      frappe/custom/doctype/custom_script/custom_script.py

+ 4
- 4
frappe/custom/doctype/custom_script/custom_script.py 查看文件

@@ -1,19 +1,19 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr

from frappe.model.document import Document

class CustomScript(Document):
def autoname(self):
if not self.script_type:
self.script_type = 'Client'
self.name = self.dt + "-" + self.script_type

def on_update(self):
frappe.clear_cache(doctype=self.dt)
def on_trash(self):
frappe.clear_cache(doctype=self.dt)


正在加载...
取消
保存