Skip to content

Commit d19268f

Browse files
oco-odoojcs-odoo
authored andcommitted
[IMP] accounting: new tag selector for custom reports
odoo/enterprise@0c0cf8e added a new way to select accounts in the account_codes engine. This commit adds some explanation in the doc on how to use this new syntax. closes #6501 X-original-commit: 1a32165 Signed-off-by: Jonathan Castillo (jcs) <jcs@odoo.com>
1 parent 185321f commit d19268f

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

content/applications/finance/accounting/reporting/customize.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,42 @@ To match the letter `C` or `D` in a prefix and not use it as a suffix, use an em
220220
| `21D\\()`
221221
| This formula matches accounts whose code starts with `21D`, regardless of their balance sign.
222222
223+
In addition to using code prefixes to include accounts, you can also match them with **account
224+
tags**. This is especially useful, for example, if your country lacks a standardized chart of
225+
accounts, where the same prefix might be used for different purposes across companies.
226+
227+
.. example::
228+
| `tag(25)`
229+
| This formula matches accounts whose associated tags contain the one with id *25*.
230+
231+
If the tag you reference is defined in a data file, an xmlid can be used instead of the id.
232+
233+
.. example::
234+
| `tag(my_module.my_tag)`
235+
| This formula matches accounts whose associated tags include the tag denoted by
236+
*my_module.my_tag*.
237+
238+
You can also use arithmetic expressions with tags, possibly combining them with prefix selections.
239+
240+
.. example::
241+
| `tag(my_module.my_tag) + tag(42) + 10`
242+
| The balances of accounts tagged as *my_module.my_tag* will be summed with those of accounts
243+
linked to the tag with ID *42* and accounts with the code prefix `10`
244+
245+
`C` and `D` suffixes can be used in the same way with tags.
246+
247+
.. example::
248+
| `tag(my_module.my_tag)C`
249+
| This formula matches accounts with the tag *my_module.my_tag* and a credit balance.
250+
251+
Prefix exclusion also works with tags.
252+
253+
.. example::
254+
| `tag(my_module.my_tag)\\(10)`
255+
| This formula matches accounts with the tag *my_module.my_tag* and a code not starting with
256+
`10`.
257+
258+
223259
'External Value' engine
224260
-----------------------
225261

0 commit comments

Comments
 (0)