[fix] [minor] reportview edit - check if write permission, before opening popup

This commit is contained in:
Anand Doshi 2013-08-13 13:08:53 +05:30
parent 78f083da7a
commit 6773f65478

View file

@ -261,6 +261,8 @@ wn.views.ReportView = wn.ui.Listing.extend({
edit_cell: function(row, docfield) {
if(wn.model.std_fields_list.indexOf(docfield.fieldname)!==-1) {
wn.throw(wn._("Cannot edit standard fields"));
} else if(wn.boot.profile.can_write.indexOf(this.doctype)===-1) {
wn.throw(wn._("No permission to edit"));
}
var me = this;
var d = new wn.ui.Dialog({