workflow updates: update_field not editable & bug fix
This commit is contained in:
parent
f50e801bf5
commit
e6fba1a210
2 changed files with 7 additions and 4 deletions
|
|
@ -182,7 +182,8 @@ Field.prototype.get_status = function() {
|
|||
ret = 'Read';
|
||||
}
|
||||
// fields updated by workflow must be read-only
|
||||
if(in_list(cur_frm.states.update_fields, this.df.fieldname)) {
|
||||
if(in_list(cur_frm.states.update_fields, this.df.fieldname) ||
|
||||
this.df.fieldname==cur_frm.states.state_fieldname) {
|
||||
ret = 'Read';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,9 +104,11 @@ wn.ui.form.States = Class.extend({
|
|||
.addClass("icon-" + state_doc.icon);
|
||||
|
||||
// set the style
|
||||
this.$wrapper.find(".btn:first").removeClass()
|
||||
.addClass("btn dropdown-toggle")
|
||||
.addClass("btn-" + state_doc.style.toLowerCase());
|
||||
var btn = this.$wrapper.find(".btn:first");
|
||||
btn.removeClass().addClass("btn dropdown-toggle")
|
||||
|
||||
if(state_doc && state_doc.style)
|
||||
btn.addClass("btn-" + state_doc.style.toLowerCase());
|
||||
|
||||
// show actions from that state
|
||||
this.show_actions(state);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue