Odoo Help

1

How do I create a "Today" date filter? Via the UI?

By
Iso
on 3/30/16, 7:08 PM 1,203 views

Hey * .. Anyone know if there's a way to set up a "Today" option as a filter in Odoo SA (the SaaS version)? I'd like to have a dynamic date to be able to create a custom filter that I can share, but that will reference the current date, not a specific one.             

2

Ray Carnes

--Ray Carnes--
16773
| 9 7 9
Atlanta, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0.

Completed Odoo Functional and Technical Training.

Major Skills:

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 3/30/16, 10:33 PM

Create a new view which inherits the view you want to change, and then add a filter:

 

<filter string="Today" domain="[('date_field_from_model', '&gt;=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date_field_from_model', '&lt;=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>

Hey..thanks! This gave me the direction I needed. However I wasn't able to get it to show up in the view.. I ended up editing the search view directly instead of extending it. When I created the extended view it wasn't showing up in the menu. I've created a view that extends stock.picking.internal.search with the following: But it doesn't show up in the filter.. can you possibly give me a clue as to why?

Iso
on 4/1/16, 4:16 PM

" "

Iso
on 4/1/16, 4:17 PM

sorry.. it's cleaning the markup I'm posting.. anyway.. if you have any tips as to what I need to do to get it to show up in the filter menu from an extended view... let me know . I've marked your answer as correct. Thanks!

Iso
on 4/1/16, 4:18 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)

Stats

Asked: 3/30/16, 7:08 PM
Seen: 1203 times
Last updated: 10/24/16, 3:38 PM