SmartERP Documentation An Ashewa Technology Solutions Platform

Trash bin and automated retention purges

Soft-delete trash protection, 30-day retention policies, role-restricted restoration, and automated scheduled purge cron jobs.

1. Overview & Business Value#

This comprehensive operational guide details the architecture, business workflows, configuration parameters, and execution steps for Trash bin and automated retention purges within SmartERP.

Module map showing dependencies between SmartERP Supply Chain Core, Tenders, Store Vouchers, Landed Costs, and WMS.
SmartERP Supply Chain and Sourcing architectural module map.

Accidental document deletion can disrupt ongoing projects or destroy legal audit compliance. SmartERP Documents Enterprise provides a soft-delete Trash Bin mechanism coupled with automated retention enforcement.

2. Prerequisites & Security Access Groups#

  • Required Modules: documents, smarterp_dms
  • Security Groups:
    • Documents User (Technical ID: documents.group_documents_user)
    • Documents Administrator (Technical ID: documents.group_documents_manager)
  • Master Data Dependencies: Workspace hierarchies, document tags, automated actions, OCR rule definitions, and retention policies.

3. Step-by-Step Configuration & Execution#

Step 1: Navigating to the Interface#

  1. Log into your SmartERP instance at https://smarterp.et/odoo.
  2. Open the main App Switcher (grid icon in the top-left corner).
  3. Navigate to Settings → Technical.

Step 2: Operational Data Parameters & Controls#

Ensure all mandatory parameters comply with enterprise operational standards:

  • Authorized Operator: Action executed under assigned RBAC permissions (System Administrator, Certified Specialist).
  • Relational Integrity: Linked to upstream master records, approval requests, or transactional ledgers.
  • Statutory & Quality Controls: Verified against Ethiopian statutory regulations and corporate governance standards.

Step 3: Operational Execution & State Progression#

  • State Progression Gate: Advance record from Draft through Audited to Confirmed / Certified.
  • Integrated System Impact: Automatically updates real-time operational states and posts financial/inventory journal moves.
  • Audit Verification: System registers tamper-evident audit records logging user ID, timestamp, and cryptographic transaction digests.

Soft-delete trash architecture#

When a document is deleted by an authorized user:

  1. It is not immediately removed from the PostgreSQL database or file storage.
  2. The document is flagged with is_trash = True and timestamped with trash_date = fields.Datetime.now().
  3. The document is immediately hidden from standard workspace views, search results, and API endpoints.
  4. It moves to the Trash Bin view, accessible only to workspace managers and administrators.

Restoring deleted documents#

To restore a soft-deleted document:

  1. Navigate to Documents $\rightarrow$ Configuration $\rightarrow$ Trash Bin.
  2. Select the document or batch of documents to recover.
  3. Click Actions $\rightarrow$ Restore from Trash.
  4. The document is restored to its original workspace with all tags, version history, and attachments intact.

Automated retention purges (Cron)#

To prevent unbounded storage growth while ensuring compliance:

  • Default Retention Window: Documents remain in the Trash Bin for 30 calendar days.
  • Automated Purge Cron: An automated background cron job (documents_trash_purge_cron) runs nightly.
  • Permanent Purge: Documents that have resided in the Trash Bin for longer than the configured retention threshold are permanently deleted, freeing disk space and removing database references.

4. Advanced Configuration Points#

  • Automated Actions & Scheduled Tasks (Crons):
    • Documents: Run OCR field extraction (documents.ir_cron_ocr_process): Runs every 15 minutes to process incoming scanned document text
    • Documents: Archive expired records (documents.ir_cron_retention): Runs weekly to enforce statutory document retention schedules
  • Custom Print Templates & Reports:
    • Document Audit Trail & Access Log
    • Workspace Document Storage & Activity Ledger
  • Multi-Company Rules: Record-level security isolation under Company 1 (Ashewa Technology Solutions S.C.), preventing cross-company ledger leakage across parent and subsidiary legal entities.

5. Comprehensive Troubleshooting Matrix#

Error Symptom / ExceptionProbable Root CauseCorrective Action / Resolution
Access Rights Error: Workspace access restrictedUser lacks permissions for confidential legal or HR workspace.Request workspace access clearance from Documents Administrator.
OCR Extraction Failure: Low scan resolutionScanned image DPI is below minimum threshold for optical character recognition.Upload document at minimum 300 DPI resolution with clear contrast.
Upload Blocked: File size exceeds maximum limitFile exceeds system maximum attachment size.Compress file or upload via secure external cloud link.
Last updated: 2026-11-15