You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 rivejä
326 B

  1. """trigger doctype events"""
  2. def trigger(method, doc):
  3. try:
  4. import startup.event_handlers
  5. except ImportError:
  6. return
  7. if hasattr(startup.event_handlers, method):
  8. getattr(startup.event_handlers, method)(doc)
  9. if hasattr(startup.event_handlers, 'doclist_all'):
  10. startup.event_handlers.doclist_all(doc, method)