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
58c1963c
Commit
58c1963c
authored
10 years ago
by
Denis Ledoux
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] mail: app specific notifications
parent
47c32052
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/mail/data/mail_data.xml
+1
-0
1 addition, 0 deletions
addons/mail/data/mail_data.xml
addons/mail/update.py
+3
-0
3 additions, 0 deletions
addons/mail/update.py
with
4 additions
and
0 deletions
addons/mail/data/mail_data.xml
+
1
−
0
View file @
58c1963c
...
...
@@ -20,6 +20,7 @@
<field
name=
"interval_number"
>
1
</field>
<field
name=
"interval_type"
>
weeks
</field>
<field
name=
"numbercall"
>
-1
</field>
<field
name=
"nextcall"
eval=
"(DateTime.now() + timedelta(days=7)).strftime('%Y-%m-%d %H:%M:%S')"
/>
<field
eval=
"False"
name=
"doall"
/>
<field
eval=
"'publisher_warranty.contract'"
name=
"model"
/>
<field
eval=
"'update_notification'"
name=
"function"
/>
...
...
This diff is collapsed.
Click to expand it.
addons/mail/update.py
+
3
−
0
View file @
58c1963c
...
...
@@ -36,6 +36,8 @@ class publisher_warranty_contract(AbstractModel):
nbr_share_users
=
user_count
([(
"
share
"
,
"
=
"
,
True
)])
nbr_active_share_users
=
user_count
([(
"
share
"
,
"
=
"
,
True
),
(
"
login_date
"
,
"
>=
"
,
limit_date_str
)])
user
=
Users
.
browse
(
cr
,
uid
,
uid
)
domain
=
[(
'
application
'
,
'
=
'
,
True
),
(
'
state
'
,
'
in
'
,
[
'
installed
'
,
'
to upgrade
'
,
'
to remove
'
])]
apps
=
self
.
pool
[
'
ir.module.module
'
].
search_read
(
cr
,
uid
,
domain
,
[
'
name
'
])
web_base_url
=
get_param
(
'
web.base.url
'
)
msg
=
{
...
...
@@ -49,6 +51,7 @@ class publisher_warranty_contract(AbstractModel):
"
version
"
:
release
.
version
,
"
language
"
:
user
.
lang
,
"
web_base_url
"
:
web_base_url
,
"
apps
"
:
[
app
[
'
name
'
]
for
app
in
apps
],
}
msg
.
update
(
self
.
pool
.
get
(
"
res.company
"
).
read
(
cr
,
uid
,
[
1
],
[
"
name
"
,
"
email
"
,
"
phone
"
])[
0
])
return
msg
...
...
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