pytz support for filter domains

Technical Name:
web_pytz
Version:
7.0
License:
Author:
Therp BV
Website:
https://odoo-community.org/web/image/product.template/4385/image_1920?unique=47e6b07
  • Odoo Version

Terms and Conditions 

Introduction

This module allows complex timezone operations in domains mimicing python's pytz. The heavy lifting is done by http://momentjs.com/timezone.

It is meant to allow correct filters for 'Today', 'Yesterday' etc.

In addition to implementing a subset of pytz.tzinfo and datetime.astimezone, there's a shortcut called utc_today() which returns the beginning of the day in the current user's time zone translated to UTC, this is equivalent to:

pytz.timezone(tz).localize(datetime.datetime.now().replace(hour=0, minute=0,
    second=0)).astimezone(pytz.utc)

in python.

Usage

Depend on this module and use filters like:

[('write_date', '>=', utc_today().strftime('%Y-%m-%d %H:%M:%S'))]

which displays records changed in the user's conception of today.

This is a preview of the recently viewed products by the user.
Once the user has seen at least one product this snippet will be visible.

Recently viewed Products