Bläddra i källkod

communcation date & doctype check timestamp if not deleted error

version-14
Rushabh Mehta 12 år sedan
förälder
incheckning
170e6d523a
2 ändrade filer med 5 tillägg och 3 borttagningar
  1. +2
    -3
      public/js/wn/views/communication.js
  2. +3
    -0
      webnotes/model/wrapper.py

+ 2
- 3
public/js/wn/views/communication.js Visa fil

@@ -10,10 +10,9 @@ wn.views.CommunicationList = Class.extend({
return;
}
var sortfn = function (a, b) { return new Date(a.modified) > new Date(b.modified)
? -1 : 1}
var sortfn = function (a, b) { return (b > a) ? 1 : -1; }
this.list = this.list.sort(sortfn);
this.make();
},
make: function() {


+ 3
- 0
webnotes/model/wrapper.py Visa fil

@@ -118,6 +118,9 @@ class ModelWrapper:
SELECT modified FROM `tab%s` WHERE name="%s" for update"""
% (self.doc.doctype, self.doc.name))

if not tmp:
webnotes.msgprint("""This record does not exist. Please refresh.""", raise_exception=1)

if tmp and str(tmp[0][0]) != str(self.doc.modified):
webnotes.msgprint("""
Document has been modified after you have opened it.


Laddar…
Avbryt
Spara