'Run an action in background. If the action has an inner function,
like _submit for submit, it will call that instead'

def queue_action(self, action, **kwargs):

    if hasattr(self, (u'_' + action)):
        action = (u'_' + action)
    if file_lock.lock_exists(self.get_signature()):
        frappe.throw(_(u'This    document    is    currently    queued    for    execution.    Please    try    again'), title=_(u'Document    Queued'), indicator=u'red')
    self.lock()
    enqueue(u'frappe.model.document.execute_action', doctype=self.doctype, name=self.name, action=action, **kwargs)
