跳至內容
選單
此問題已被標幟
2 回覆
2544 瀏覽次數

Is there any way to write a date filter for the previous weekday or business day?

頭像
捨棄
作者

Does this exist?

最佳答案

I needed a filter that would show deliver orders that were due today or late. Here’s how I accomplished that:

<filter name=“today” string=“For Today” 
domain=“[(‘state’,'in’,('assigned’, 'partially_available’)),
('min_date’, ’&lt;=’,datetime.datetime.now().strftime(’%Y-%m-%d 23:23:59’))]”
help=“Pickings to be done today”/>

I've written a post that goes into a bit more detail here: http://haplesstechnoweenie.com/post/143806280450/add-for-today-date-filter-to-odoo-search-view


頭像
捨棄