瀏覽代碼

[fix] frm.can_create when language is different (#4567)

version-14
Faris Ansari 7 年之前
committed by GitHub
父節點
當前提交
4078a543c4
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      frappe/public/js/legacy/clientscriptAPI.js

+ 3
- 1
frappe/public/js/legacy/clientscriptAPI.js 查看文件

@@ -457,8 +457,10 @@ _f.Frm.prototype.can_create = function(doctype) {
}

if(this.custom_make_buttons && this.custom_make_buttons[doctype]) {
// custom buttons are translated and so are the keys
const key = __(this.custom_make_buttons[doctype]);
// if the button is present, then show make
return !!this.custom_buttons[this.custom_make_buttons[doctype]];
return !!this.custom_buttons[key];
}

if(this.can_make_methods && this.can_make_methods[doctype]) {


Loading…
取消
儲存