Parcourir la source

resolved merge conflicts

version-14
mbauskar il y a 8 ans
Parent
révision
a5d3c90e97
3 fichiers modifiés avec 20 ajouts et 7 suppressions
  1. +1
    -1
      frappe/__init__.py
  2. +18
    -5
      frappe/custom/doctype/customize_form/test_customize_form.js
  3. +1
    -1
      frappe/public/js/legacy/form.js

+ 1
- 1
frappe/__init__.py Voir le fichier

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

__version__ = '8.6.7'
__version__ = '8.6.8'
__title__ = "Frappe Framework"

local = Local()


+ 18
- 5
frappe/custom/doctype/customize_form/test_customize_form.js Voir le fichier

@@ -10,11 +10,23 @@ QUnit.test("test customize form", function(assert) {
() => frappe.timeout(2),
() => cur_frm.set_value('doc_type', 'ToDo'),
() => frappe.timeout(2),

() => assert.equal(cur_frm.doc.fields[1].fieldname, 'status', "Status Field"),

() => {
// find the status column as there may be other custom fields like
// kanban etc.
frappe.row_idx = 0;
cur_frm.doc.fields.every((d, i) => {
if(d.fieldname==='status') {
frappe.row_idx = i;
return false;
} else {
return true;
}
});
assert.equal(cur_frm.doc.fields[frappe.row_idx].fieldname, 'status',
'check if selected field is "status"');
},
// open "status" row
() => cur_frm.fields_dict.fields.grid.grid_rows[1].toggle_view(),
() => cur_frm.fields_dict.fields.grid.grid_rows[frappe.row_idx].toggle_view(),
() => frappe.timeout(0.5),

// try deleting it
@@ -25,7 +37,8 @@ QUnit.test("test customize form", function(assert) {
() => frappe.timeout(0.5),

// status still exists
() => assert.equal(cur_frm.doc.fields[1].fieldname, 'status', "Status Field Still Exists"),
() => assert.equal(cur_frm.doc.fields[frappe.row_idx].fieldname, 'status',
'check if selected field is still "status"'),
() => done()
]);
});

+ 1
- 1
frappe/public/js/legacy/form.js Voir le fichier

@@ -941,7 +941,7 @@ _f.Frm.prototype.validate_form_action = function(action, resolve) {
// Allow submit, write, cancel and create permissions for read only documents that are assigned by
// workflows if the user already have those permissions. This is to allow for users to
// continue through the workflow states and to allow execution of functions like Duplicate.
if (frappe.workflow.is_read_only(this.doctype, this.docname) && (perms["write"] ||
if (!frappe.workflow.is_read_only(this.doctype, this.docname) && (perms["write"] ||
perms["create"] || perms["submit"] || perms["cancel"])) {
var allowed_for_workflow = true;
}


Chargement…
Annuler
Enregistrer