ソースを参照

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 .utils.jinja import get_jenv, get_template, render_template

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

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"})
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() {
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
value = 0;
} else {
@@ -1215,39 +1216,31 @@ frappe.ui.form.ControlAttachImage = frappe.ui.form.ControlAttach.extend({
frappe.ui.form.ControlSelect = frappe.ui.form.ControlData.extend({
html_element: "select",
make_input: function() {
var me = this;
this._super();
this.set_options();
},
set_input: function(value) {
set_formatted_input: function(value) {
// 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) {
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) {
// reset options, if something new is set
var options = this.df.options || [];
if(typeof this.df.options==="string") {
options = this.df.options.split("\n");


読み込み中…
キャンセル
保存