瀏覽代碼

Merge branch 'develop'

version-14
mbauskar 8 年之前
父節點
當前提交
6c202ae2b5
共有 3 個檔案被更改,包括 18 行新增27 行删除
  1. +1
    -1
      frappe/__init__.py
  2. +1
    -3
      frappe/patches/v8_1/update_format_options_in_auto_email_report.py
  3. +16
    -23
      frappe/public/js/frappe/form/control.js

+ 1
- 1
frappe/__init__.py 查看文件

@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import * from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template from .utils.jinja import get_jenv, get_template, render_template


__version__ = '8.3.0'
__version__ = '8.3.1'
__title__ = "Frappe Framework" __title__ = "Frappe Framework"


local = Local() local = Local()


+ 1
- 3
frappe/patches/v8_1/update_format_options_in_auto_email_report.py 查看文件

@@ -11,6 +11,4 @@ def execute():


auto_email_list = frappe.get_all("Auto Email Report", filters={"format": "XLS"}) auto_email_list = frappe.get_all("Auto Email Report", filters={"format": "XLS"})
for auto_email in auto_email_list: for auto_email in auto_email_list:
doc = frappe.get_doc("Auto Email Report", auto_email.name)
doc.format = "XLSX"
doc.save()
frappe.db.set_value("Auto Email Report", auto_email.name, "format", "XLSX")

+ 16
- 23
frappe/public/js/frappe/form/control.js 查看文件

@@ -344,7 +344,8 @@ frappe.ui.form.ControlInput = frappe.ui.form.Control.extend({


set_disp_area: function() { set_disp_area: function() {
let value = this.get_input_value(); let value = this.get_input_value();
if(in_list(["Currency", "Int", "Float"], this.df.fieldtype) && (this.value === 0 || value === 0)) {
if(in_list(["Currency", "Int", "Float"], this.df.fieldtype)
&& (this.value === 0 || value === 0)) {
// to set the 0 value in readonly for currency, int, float field // to set the 0 value in readonly for currency, int, float field
value = 0; value = 0;
} else { } else {
@@ -1215,39 +1216,31 @@ frappe.ui.form.ControlAttachImage = frappe.ui.form.ControlAttach.extend({
frappe.ui.form.ControlSelect = frappe.ui.form.ControlData.extend({ frappe.ui.form.ControlSelect = frappe.ui.form.ControlData.extend({
html_element: "select", html_element: "select",
make_input: function() { make_input: function() {
var me = this;
this._super(); this._super();
this.set_options(); this.set_options();
}, },
set_input: function(value) {
set_formatted_input: function(value) {
// refresh options first - (new ones??) // refresh options first - (new ones??)
this.set_options(value || "");
if(value==null) value = '';
this.set_options(value);


var input_value = null;
// set in the input element
this._super(value);

// check if the value to be set is selected
var input_value = '';
if(this.$input) { if(this.$input) {
var input_value = this.$input.val();
input_value = this.$input.val();
} }


// not a possible option, repair
if(this.doctype && this.docname) {
// model value is not an option,
// set the default option (displayed)
var model_value = frappe.model.get_value(this.doctype, this.docname, this.df.fieldname);
if(model_value == null && (input_value || "") != (model_value || "")) {
this.set_model_value(input_value);
} else {
this.last_value = value;
}
} else {
if(value !== input_value) {
this.set_value(input_value);
}
if(value && input_value && value !== input_value) {
// trying to set a non-existant value
// model value must be same as whatever the input is
this.set_model_value(input_value);
} }

this._super(value);

}, },
set_options: function(value) { set_options: function(value) {
// reset options, if something new is set
var options = this.df.options || []; var options = this.df.options || [];
if(typeof this.df.options==="string") { if(typeof this.df.options==="string") {
options = this.df.options.split("\n"); options = this.df.options.split("\n");


Loading…
取消
儲存