This question has been flagged
6 Replies
6762 Views

In video, from Webinar:

https://www.odoo.com/event/odoo-accounting-tutorial-2018-12-12-1601

https://www.youtube.com/watch?v=faF6XgcWrPM 

8:30

Richard shows using Applicable Filter 'Departments' to get amounts for departments in columns.

But he skipped the step how he created this filter.

I tried to use my user defined filters, but without success.
Can someone help and show an example of such a filter?
Avatar
Discard
Best Answer

Hi, sure, it's one of new features of v12 - you can configure filters in technical settings of financial reports:

- go to Accounting module

- click on menu: Configuration => Financial reports (you should be in developer mode in order to see this menu item)

- click on "Profit and Loss" report (or any other)

- you will see the field "Applicable Filters" in "Available Filters & Options" section - there you can add a new filter which has a lot of flexibility (up to python code editor)


PS: if you found this answer helpful - please upvote it! :)

Avatar
Discard
Author

Thank you for your answer!

but my main problem is how to configure this filter. Where can I read about its settings?

Hi, no problem. Filters in Odoo are based on sets of conditions called "domain". You can read about them, for example, in developer docs here:

https://www.odoo.com/documentation/12.0/reference/orm.html#domains

Author Best Answer

If i understand correctly, "Domain" can contain only search criterias. That's good but it does not affect columns structure. After several tries, i found that if filter will contain something like 

" {'group_by': ['analytic_account_id']}"

in context field - new columns will appear.

Where can I read about all possible features of using 'context' field with account report? 

Avatar
Discard