Background Document Posting

User Manual for Background Document Posting

Overview

The Background Document Posting DocType is designed to handle automated submission or cancellation of documents in the Frappe Framework. It provides features to queue background tasks for posting documents with a specified timeout for task execution.


Key Features

  • Automated Posting: Supports submission and cancellation of documents.
  • Timeout Management: Configurable timeout to control the execution time of background tasks.
  • Amendment Tracking: Tracks the original document for amendments.
  • Permissions: Ensures only authorized users (System Managers) can access and use the feature.

Pre-Requisites

  1. Ensure the user has the System Manager role.
  2. Verify that the document type intended for posting is submittable.
  3. Check that the server environment is set up for background job processing.
  4. Ensure the Background Jobs feature is functioning correctly.

Step-by-Step Usage

1. Creating a Background Document Posting Entry

  1. Navigate to Background Document Posting in the module menu.
  2. Click on New.
  3. Fill in the required fields:
    • Select the Document Type (e.g., Sales Invoice).
    • Enter the Document Name (e.g., SINV-0001).
    • Choose the Posting Type (submit or cancel).
    • Set the Timeout if the default (600 seconds) is not suitable.
  4. Save the entry.
  5. Submit the entry to initiate the background task.

2. Tracking Task Status

  • Once submitted, the system processes the task in the background.
  • Check the Background Jobs page to monitor the progress or review logs in case of errors.

3. Amended Document Handling

  • If the document is amended, the system automatically updates the Amended From field with the original document reference.

Script Customizations

Custom scripts can be implemented to extend the functionality of the Background Document Posting DocType. For example:

  1. Adding Validation Logic:

    • Ensure that only valid document names are entered.
    • Validate timeout values to ensure they are within a practical range.
  2. Automated Triggers:

    • Use server-side scripts to auto-create background posting entries based on specific conditions, such as daily document submissions.
  3. Integration with Notification System:

    • Send notifications upon successful or failed task completion.

Troubleshooting (Common Errors and Resolutions)

  1. Error in Document Posting

    • Check the Error Logs for details.
    • Ensure the document referenced in Document Name exists and is valid.
  2. Timeout Issues

    • Increase the Timeout field value for large documents or slow processes.
  3. Access Denied

    • Verify that the user has the System Manager role.
  4. Background Jobs Not Executing

    • Ensure the server is configured to run background jobs (e.g., Celery workers are active).

User Roles and Permissions

  • System Manager: Full access to create, modify, submit, and delete background document posting entries.
  • Administrator: Manages system configurations for background processing.

Key Notes

  • Use appropriate Timeout values to balance performance and reliability.
  • Regularly monitor the Background Jobs page for any stuck or failed tasks.
  • Maintain permissions to avoid unauthorized access or misuse.
  • Always test custom scripts in a development environment before deploying to production.

For further assistance, contact your system administrator or email support at support@aakvatech.com.

Discard
Save
Was this article helpful?

On this page