Back to Reconciliation models

Regex in reconciliation models

In reconciliation models you can use regex to control exactly which transactions a model applies to and to extract amounts from the label.

Matching conditions: Match Regex

In the matching conditions you can set Label to Contains, Not contains, or Match Regex. Enter a regular expression; Odoo will then only select transactions that match that expression and the other conditions.

Counterpart items: From label

For Amount type you can choose From label. Then a percentage or amount is taken from the transaction label via regex. Useful when the label follows a fixed pattern.

Examples and testing

Regex is a pattern that matches text. Some examples for the label: (1) ^FACTUUR

For more on regex: Learn Regex (Sitepoint)

Frequently asked questions

Where do I use regex in reconciliation models?
In matching conditions: set Label to Match Regex and enter an expression. In counterpart items: choose Amount type From label to extract an amount or percentage from the label via regex.
How do I test a regex without wrong bookings?
Turn off auto-confirm. Then you can review the suggested booking before confirming. Prefer testing on a copy or staging environment.
Where can I learn more about regex syntax?
The Learn Regex course on Sitepoint explains the syntax. See the link below the examples in this article.