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
fa2941ec
Unverified
Commit
fa2941ec
authored
7 years ago
by
Martin Trigaux
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] website_mail_channel: fix member count
Was showing 0 for the public user
parent
a54c60b4
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/website_mail_channel/controllers/main.py
+4
-1
4 additions, 1 deletion
addons/website_mail_channel/controllers/main.py
addons/website_mail_channel/views/website_mail_channel_templates.xml
+1
-1
1 addition, 1 deletion
...ite_mail_channel/views/website_mail_channel_templates.xml
with
5 additions
and
2 deletions
addons/website_mail_channel/controllers/main.py
+
4
−
1
View file @
fa2941ec
...
...
@@ -49,7 +49,10 @@ class MailGroup(http.Controller):
[],
[
'
res_id
'
])
message_data
=
dict
((
message
[
'
res_id
'
],
message
[
'
res_id_count
'
])
for
message
in
messages
)
group_data
=
dict
((
group
.
id
,
{
'
monthly_message_nbr
'
:
message_data
.
get
(
group
.
id
,
0
)})
for
group
in
groups
)
group_data
=
dict
(
(
group
.
id
,
{
'
monthly_message_nbr
'
:
message_data
.
get
(
group
.
id
,
0
),
'
members_count
'
:
len
(
group
.
channel_partner_ids
)})
for
group
in
groups
.
sudo
())
return
request
.
render
(
'
website_mail_channel.mail_channels
'
,
{
'
groups
'
:
groups
,
'
group_data
'
:
group_data
})
@http.route
([
"
/groups/is_member
"
],
type
=
'
json
'
,
auth
=
"
public
"
,
website
=
True
)
...
...
This diff is collapsed.
Click to expand it.
addons/website_mail_channel/views/website_mail_channel_templates.xml
+
1
−
1
View file @
fa2941ec
...
...
@@ -50,7 +50,7 @@
<div
t-esc=
"group.description"
class=
"text-muted"
/>
</div>
<div
class=
"col-md-2"
>
<i
class=
'fa fa-fw fa-user'
/>
<t
t-esc=
"
len(
group
.channel_partner_ids)
"
/>
members
<br
/>
<i
class=
'fa fa-fw fa-user'
/>
<t
t-esc=
"group
_data[group.id]['members_count']
"
/>
members
<br
/>
<i
class=
'fa fa-fw fa-envelope-o'
/>
<t
t-raw=
"group_data[group.id]['monthly_message_nbr']"
/>
messages / month
</div>
<div
class=
"col-md-3"
>
...
...
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