Auto Directory Rules

Auto directory rules create cloud directories for your Odoo records on their own. You set the directory pattern once, and new records then file themselves, on any model.

This page shows you how to open the rules, create a rule, choose the model and directory name, nest rules under a parent rule, limit the records a rule applies to, and set the rule priority.

To browse the directories that your rules create, see Browse Cloud Documents and Directories.

Open Auto Directory Rules

  1. Go to Cloud Storage ‣ Configuration ‣ Rules ‣ Auto Directory Rules.

  2. The list shows all your rules.

The Auto Directory Rules list with a few rules

Create a rule

  1. Go to Cloud Storage ‣ Configuration ‣ Rules ‣ Auto Directory Rules.

  2. Click New.

  3. In Rule Name, enter a name for the rule.

  4. Set the Rule Types for this rule.

  5. In Priority, set the order of this rule among your other rules. See Rule priority.

  6. In Model To Sync, choose the model. See Choose the model and directory name.

  7. In Directory Name, set the name of the directory.

  8. If this rule sits under another rule, choose the Parent Rule. See Nest rules under a parent rule.

  9. If needed, limit the records the rule applies to. See Limit the records a rule applies to.

  10. Save the rule.

A new auto directory rule form with Rule Name, Priority, Rule Types, Model To Sync and Directory Name filled in

Choose the model and directory name

  • Model To Sync: the Odoo model whose records get their own cloud directory, for example a model for customers or sales orders.

  • Directory Name: the name pattern for each record’s directory. You set it once, and every new record of the model gets its directory with this name.

Nest rules under a parent rule

You can place a rule under another rule. The directories of the child rule then sit inside the directories of the parent rule.

  1. Open the child rule.

  2. In Parent Rule, choose the parent rule.

  3. In Parent Model Field, choose the field that links the records of this rule’s model to the records of the parent rule’s model.

  4. Save the rule.

A rule form with Parent Rule and Parent Model Field filled in

Limit the records a rule applies to

By default, a rule applies to the records of its model. You can narrow this down:

  • Only with attachments: tick it to apply the rule only to records that have attachments.

  • Only These Records: set conditions so the rule applies only to the records that match them.

Records Matching Now shows how many records the rule matches at the moment. Use it to check your filter before you save.

The record filter area of a rule with Only with attachments, Only These Records and Records Matching Now

Rule priority

When you have several rules, Priority sets the order in which they apply. You set it when you create the rule, and you can change it at any time:

  1. Open the rule.

  2. Change the Priority.

  3. Save the rule.