How to Define a Domain with Multiple Conditions in Tryton?

Hello,
I would like to know how to define a domain with multiple conditions in Tryton. For example, I need to include records based on certain ranges or exclude them based on other conditions. What is the best approach to dynamically create a domain in such scenarios?
If possible, please provide examples or best practices for handling complex domains with conditions like:

Including records based on age ranges or other criteria.
Excluding certain values while including others.
Thank you for your help!

Hello,

You can combine clauses in domains :

domain = [
    # Age range
    ('age', '>=', 18),
    ('age', '<=', 60),
    # include values
    ('state', 'in', ('draft', 'validated')),
    # exclude values
    ('state', 'not in', ('cancelled', 'paid')),
    ]

There are many usable criterions and possibilities, the full documentation on domains should help.