Advertisement
hpema108

Untitled

Jan 23rd, 2016
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None
  1.  
  2. from __future__ import unicode_literals
  3. import frappe
  4. from frappe import msgprint, _
  5. from frappe.model.document import Document
  6.  
  7. class USSDSession(Document):
  8.     def onload(self):
  9.         msgprint(_("seen = " + self.seen), raise_exception=0)
  10.         flag = self.seen
  11.         if not flag :
  12.             self.db_set('seen', True, update_modified=False)
  13.             frappe.local.flags.commit = True
  14.             msgprint(_("Data base saved " + str(self.seen)), raise_exception=0)
  15.         else :
  16.             msgprint(_("Else " + str(self.seen)), raise_exception=0)
Advertisement
RAW Paste Data Copied
Advertisement