Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odoo CE
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
Comunitats Energètiques
Odoo CE
Merge requests
!161
Fix/edit email templates
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix/edit email templates
fix/edit-email-templates
into
dev
Overview
6
Commits
11
Pipelines
15
Changes
1
Merged
konykon
requested to merge
fix/edit-email-templates
into
dev
1 year ago
Overview
6
Commits
11
Pipelines
15
Changes
1
Expand
0
0
Merge request reports
Viewing commit
6ece4364
Prev
Next
Show latest version
1 file
+
12
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6ece4364
Add followers
· 6ece4364
konykon
authored
1 year ago
energy_communities/services/crm_lead_service.py
+
12
−
0
Options
@@ -86,3 +86,15 @@ class CRMLeadService(Component):
elif
source_xml_id
==
"
ce_source_general_info
"
:
template_external_id
=
"
email_templ_lead_request_platform_news_confirm_id
"
return
template_external_id
def
add_follower
(
self
,
crm_lead_id
):
instance_admin
=
self
.
env
.
ref
(
"
energy_communities.role_ce_manager
"
).
id
company_id
=
crm_lead_id
.
company_id
.
id
followers
=
self
.
env
[
"
res.users
"
].
search
(
[
(
"
role_line_ids.role_id
"
,
"
=
"
,
instance_admin
),
(
"
company_ids.id
"
,
"
=
"
,
company_id
)
]
)
if
followers
:
crm_lead_id
.
message_subscribe
(
partner_ids
=
followers
.
partner_id
.
ids
)
Loading