workflow updates: update_field not editable & bug fix

This commit is contained in:
Rushabh Mehta 2013-01-09 19:03:20 +05:30
parent 91cf882e7d
commit f50e801bf5
2 changed files with 2 additions and 2 deletions

View file

@ -155,7 +155,7 @@ wn.ui.form.States = Class.extend({
var me = this;
$(this.$wrapper).on("click", "[data-action]", function() {
var action = $(this).attr("data-action");
var next_state = wn.workflow.get_next_state(me.frm.doc.doctype,
var next_state = wn.workflow.get_next_state(me.frm.doctype,
me.frm.doc[me.state_fieldname], action);
me.frm.doc[me.state_fieldname] = next_state;

View file

@ -63,7 +63,7 @@ wn.workflow = {
},
get_next_state: function(doctype, state, action) {
return wn.model.get("Workflow Transition", {
parent: doctype,
parent: wn.workflow.workflows[doctype].name,
state: state,
action: action,
})[0].next_state