OdooWiki OCA HUB

Auto classify files into embedded DMS

dms_field_auto_classification folder_open OCA/dms open_in_new
Document Management License: AGPL-3

Automatically classify files within a .zip file to the corresponding directory(s) related to an embedded DMS.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Extend automatic file classification so that files inside a ZIP are routed into the DMS folders of a specific Odoo record (for example a customer or vendor), based on the file name and the record's field values.

This module builds on the existing automatic classification feature. On a classification template you can now choose an Odoo model (for example Contacts). When a model is set, a Details list appears where you map each captured part of the file name (by its position) to a field of that model.

When a ZIP is imported through the classification wizard, the system looks for DMS directories linked to records of that model. It applies the template's file name pattern, extracts the matching values, and uses them to build the target folder path. The wizard also shows a 'Record Referenced' column so you can see which record each file is linked to.

  • Templates gain a Model field and a Details list (sequence, index, field).
  • The wizard's file list gains a Record Referenced column.
  • Folder selection is recalculated automatically when the template has a model.
  • A demo template shows classifying partner PDFs by VAT number.

It touches dms.classification.template, the new dms.classification.template.detail, and the wizard.dms.classification.detail wizard. Access to the new detail model is granted to the DMS manager group.

Models and fields (3)
  • dms.classification.template · extends an existing modelmodel (Model name), model_id (Model), detail_ids (Details)
  • wizard.dms.classification.detail · extends an existing modelrecord_ref (Record Referenced), template_id
  • dms.classification.template.detail · new modelindex, field_id (Field), model_id, sequence, parent_id (Parent)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 3 confirmed, 6 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 18.0
  • Go to Documents / Configuration / Classification Templates and create or edit a template.
  • You can set a model to which it is linked (res.partner for example).
  • You can define the details to indicate which field is referenced by the defined filename pattern.

Full example from res.partner:

Filename pattern: ([0-9]{8}[A-Z]).*.pdf Details: VAT (field) and 0 (index) Directory Pattern example 1: {0} \> This will attempt to add the files to the directory linked to the partner with the VAT name. Directory Pattern example 2: {0} / Misc \> This will attempt to add the files to the "Misc" subdirectory linked to the partner with the VAT name.

  • Go to Documents / Auto Classification and select a template and a .zip file.
  • Press the Analyze button
  • As many lines will be set as the number of files contained in the .zip file and apply the filename pattern.
  • The record to which they are related (res.partner for example) will be show on the lines.
  • Press the Classify button
  • The files (dms.file) will be created in the corresponding directories.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.