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

context_today in Tasks

By
Mohamed Hagag
on 12/27/13, 12:34 PM 1,149 views

Dears,

I created a filter to filter tasks with no work in the last day, and it's working fine while applying it in filters.

While the filter is linked with automated action I get this error when i try to create or modify a task I get an error with :

openerp/addons/base_action_rule/base_action_rule.py", line 101, in _filter
    domain = [('id', 'in', record_ids)] + eval(action_filter.domain)
  File "<string>", line 1, in <module>
 NameError: name 'context_today' is not defined

If there's no automated action linked with the filter - I can modify tasks normally without errors.

The domain in the filter is:

['&', ['write_date', '<', ((context_today() - relativedelta(days=1)).strftime('%Y-%m-%d'))], ['progress', '<', 100]]

Can anyone tell me what's the problem ?

I have the same issue. Filter is working in the search. But when I use it with automated action I get the same error. Anyone an idea what to use if you want to work with this filter in an Automated action?

Geert Surkijn
on 1/21/14, 5:41 PM
0
Geert Surkijn
On 2/1/14, 11:39 AM

If someone could help us out here with some kind of directions what to do, would be much appreciated :)

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

1 follower(s)

Stats

Asked: 12/27/13, 12:34 PM
Seen: 1149 times
Last updated: 3/16/15, 8:10 AM