Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

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 = {}