Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
vauxoo-dev
addons-vauxoo
Commits
c047fc31
Commit
c047fc31
authored
Jun 17, 2014
by
Jose Antonio Morales Ponce [Vauxoo]
Browse files
[FIX] Added user_id like search parameter because, the task must have a user to send a mail
parent
9ce0c257
Changes
1
Hide whitespace changes
Inline
Side-by-side
expired_task_information/model/task.py
View file @
c047fc31
...
...
@@ -83,8 +83,8 @@ class task_expired_config(osv.Model):
before_expiry
=
before_expiry
.
strftime
(
'%Y-%m-%d'
)
last_change
=
last_change
.
strftime
(
'%Y-%m-%d'
)
task_ids
=
task_obj
.
search
(
cr
,
uid
,
[(
'state'
,
'not in'
,
(
'
done'
,
'cancelled'
)
)],
[(
'state'
,
'not in'
,
(
'done'
,
'cancelled'
)),
(
'
user_id'
,
'!='
,
False
)],
context
=
context
)
for
task
in
task_ids
and
task_obj
.
browse
(
cr
,
uid
,
task_ids
):
msg_expired
=
''
...
...
@@ -602,7 +602,7 @@ Si es por alguna de las 3 siguientes razones, o alguna ajena a estos puntos just
'body_html'
:
html
,
'auto_delete'
:
True
,
},
context
=
context
)
mail_mail
.
send
(
cr
,
uid
,
[
mail_id
],
task
.
user_id
and
mail_mail
.
send
(
cr
,
uid
,
[
mail_id
],
recipient_ids
=
[
task
.
user_id
.
partner_id
.
id
],
context
=
context
)
return
True
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment