BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

OpenERP Custom Filters

In OpenERP, you may need to create custom filters for frequently used filters like Today's sales, Today's collections etc.

Here are the steps to create such custom filters.

Go to Settings > Technical > User Interface > User Defined Filters

This should show you list of all custom filters that are created so far.

  • Click on Create to create new Custom Filter
  • Provide Filter name
  • Make User field blank (so that this filter is available to all users)
  • In the model field select the model for which this Customer filter should be available
  • In the Domain field specify the Domain which is the filter condition

Below are couple of examples:

Today's sales

  • Model = Sales Order
  • Domain =&nbsp;[ ['date_order', '>=', context_today().strftime('%Y-%m-%d')], ['date_order', '<', (context_today() + datetime.timedelta(1)).strftime('%Y-%m-%d')], ]
  • Context =&nbsp;{}

Today's collections

  • Model =&nbsp;Accounting Voucher
  • Domain =&nbsp;[['date', '=', context_today().strftime('%Y-%m-%d')], ['journal_id', 'ilike', 'CASH']]
  • Context =&nbsp;{}

Products Not Sold in Past 30 days

  • Model = Products report by last moved
  • Domain =[['last_moved_date', '<', (context_today() - datetime.timedelta(30)).strftime('%Y-%m-%d')]]
  • Context =&nbsp;{}

The above filter can be modified for any 'n' number of days

원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗