您应该能够使用
context_today()
或
datetime
在
domain_force
:
# Should be the best choice, considers user timezone
[('many2one_field.the_limit_date','>=', context_today())]
# If context_today() doesn't work for some reason, you can use datetime
[('many2one_field.the_limit_date','>=', datetime.date.today().strftime('%Y-%m-%d'))]
这是
the
context_today
method
来自core和a
relevant gist for reference
.