Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
a7c7e331
Commit
a7c7e331
authored
11 years ago
by
Thibault Delavallée
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] mass_mailing: fixed variables used outside of their scope
bzr revid: tde@openerp.com-20140204165949-9xax1pul22ktsf41
parent
612fcf85
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/mass_mailing/mail_thread.py
+2
-1
2 additions, 1 deletion
addons/mass_mailing/mail_thread.py
with
2 additions
and
1 deletion
addons/mass_mailing/mail_thread.py
+
2
−
1
View file @
a7c7e331
...
...
@@ -48,6 +48,7 @@ class MailThread(osv.Model):
if
bounce_alias
in
email_to
:
bounce_match
=
tools
.
bounce_re
.
search
(
email_to
)
if
bounce_match
:
bounced_model
,
bounced_thread_id
=
None
,
False
bounced_mail_id
=
bounce_match
.
group
(
1
)
stat_ids
=
self
.
pool
[
'
mail.mail.statistics
'
].
set_bounced
(
cr
,
uid
,
mail_mail_ids
=
[
bounced_mail_id
],
context
=
context
)
for
stat
in
self
.
pool
[
'
mail.mail.statistics
'
].
browse
(
cr
,
uid
,
stat_ids
,
context
=
context
):
...
...
@@ -55,7 +56,7 @@ class MailThread(osv.Model):
bounced_thread_id
=
stat
.
res_id
_logger
.
info
(
'
Routing mail from %s to %s with Message-Id %s: bounced mail from mail %s, model: %s, thread_id: %s
'
,
email_from
,
email_to
,
message_id
,
bounced_mail_id
,
bounced_model
,
bounced_thread_id
)
if
bounced_model
and
bounced_model
in
self
.
pool
and
hasattr
(
self
.
pool
[
bounced_model
],
'
message_receive_bounce
'
):
if
bounced_model
and
bounced_model
in
self
.
pool
and
hasattr
(
self
.
pool
[
bounced_model
],
'
message_receive_bounce
'
)
and
bounced_thread_id
:
self
.
pool
[
bounced_model
].
message_receive_bounce
(
cr
,
uid
,
[
bounced_thread_id
],
mail_id
=
bounced_mail_id
,
context
=
context
)
return
False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment