Odoo Help

Welcome!

This community 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.

1

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

By
Iso
on 3/30/16, 7:08 PM 963 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--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

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. 

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

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