Community mailing list archives

community@mail.odoo.com

Re: time.strftime error on tasks

by
Mohamed Hagag
- 07/22/2015 14:49:24

is it possible to do imports in a domain filter ?!


On 07/22/2015 08:48 PM, Yassine Teimi wrote:
<blockquote cite="mid:CAJn9K8-8bO3+NnZEAwG7Q9PpVVzsJ1hSUZgApALWJTjz6uuCjA@mail.gmail.com" type="cite">

Did you do an "import time" before defining the condition ?

Le 22 juil. 2015 18:37, "Mohamed M. Hagag" <mohamedhagag1981@gmail.com> a écrit :

Dears,


I have automated action for started tasks that's using time.strftime ,


the filter is working fine on the interface but it generates error below in automated action:


ValueError: "name 'time' is not defined" while evaluating


this is the filter :

[('date_start', '<=', time.strftime('%Y-%m-%d')), ('stage_id', 'not ilike', 'done')]


And I'm using stftime on other objects and it's not generating this error only on task object .


Anyone knows why this error on tasks only ?


Regards,

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe