Odoo Help


Relative Date Dashboard?

Robert Klüsener
on 9/6/13, 3:11 AM 2,767 views

I have a filter to filter my task that are due today

[['date_deadline','<=',time.strftime('%Y-%m-%d')], ['user_id', '=', 1], '|', '|', ['state', '=', 'draft'], ['state', '=', 'open'], ['state', '=', 'pending']]

when I add this view to my dashboard (ir.ui.view.custom,114) it replaces the relative date with a fix date

<form string="My Dashboard" version="7.0">
        <board style="2-1">

            <action context="{'lang': 'de_DE', 'group_by': ['context_id'], 'tz': 'Europe/Berlin', 'uid': 1, 'dashboard_merge_domains_contexts': False}" domain="[['date_deadline', '&lt;=', '2013-09-06'], ['user_id', '=', 1], '|', '|', ['state', '=', 'draft'], ['state', '=', 'open'], ['state', '=', 'pending']]" name="192" string="Aufgaben" view_mode="kanban" /></column><column>



I am struggling changing this fix date in a relative date again in the setting. Just copy and paste the code from the filter does not work.

Robert Klüsener
On 9/9/13, 11:13 AM

I used

[['date_deadline', '<=', ((context_today()).strftime('%Y-%m-%d'))]

and it works.



In the name you can select your action %(module.xml id of my action)d. Put [['date_deadline','<=',time.strftime('%Y-%m-%d')] in the domain of the action.

try this

<record id="module.xml_id" model="model">
    <field name="domain">[['date_deadline','<=',time.strftime('%Y-%m-%d')]</field>

Remove this part of the domain in your board and in the attribute


Like this?

        &lt;action context="{'lang': 'de_DE', 'group_by': ['context_id'], 'tz': 'Europe/Berlin', 'uid': 1, 'dashboard_merge_domains_contexts': False}" domain="['date_deadline','&lt;=',time.strftime('%Y-%m-%d')], ['user_id', '=', 1], '|', '|', ['state', '=', 'draft'], ['state', '=', 'open'], ['state', '=', 'pending']]" name="192" string="Aufgaben" view_mode="kanban" /&gt;

This does not work - am getting an error in the dashboard

Feuerwear GmbH & Co. KG, Robert Klüsener
on 9/6/13, 3:16 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.


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

2 follower(s)


Asked: 9/6/13, 3:11 AM
Seen: 2767 times
Last updated: 1/18/17, 4:51 AM