Hi all,
how can I filter with 'OR' and 'AND'?
I would like to filter following:
['|', [('date', '=', (datetime.now() + timedelta(days=3)).strftime('%Y-%m-%d')), ('country_id', '!=', 'Germany')],
[('date', '=', (datetime.now() + timedelta(days=3)).strftime('%Y-%m-%d'))), ('country_id', '=', 'Germany')]]
In words:
Country != Germany AND date = 3 days in the future
OR
Country = Germany AND dates = 1 day in the future.
This gives me the error: ValueError: <class 'TypeError'>: "unhashable type: 'list'" while evaluating
What am I doing wrong?
Thanks!
Please specify that in which you want AND and OR.
@Mital I updated my text above.
This tips will help you in odoo customization: https://github.com/sehrishnaz/learnopenerp/wiki