Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

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 = 

    [
    ['date_order', '>=', context_today().strftime('%Y-%m-%d')],
    ['date_order', '<', (context_today() + datetime.timedelta(1)).strftime('%Y-%m-%d')],
    ]

  • Context = {}

Today's collections

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


 

 

 

  • No labels