Skip to content

Commit

Permalink
REF: change the method for message posting
Browse files Browse the repository at this point in the history
  • Loading branch information
flotho committed Oct 20, 2024
1 parent 83ec256 commit 6f9f45c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crm_project_create/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"application": False,
"installable": True,
"depends": [
"crm",
"sale_project",
"crm",
"sale_project",
],
"data": [
"security/ir.model.access.csv",
Expand Down
5 changes: 2 additions & 3 deletions crm_project_create/wizards/crm_create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ def create_project(self):
.create(self._prepare_create_project_values())
)
self.lead_id.project_id = project
project.message_post_with_view(
project.message_post_with_source(
"mail.message_origin_link",
values={"self": self.lead_id.project_id, "origin": self.lead_id},
render_values={"self": self.lead_id.project_id, "origin": self.lead_id},
subtype_id=self.env.ref("mail.mt_note").id,
author_id=self.env.user.partner_id.id,
)


def _prepare_create_project_values(self):
return {
"name": self.project_name,
Expand Down

0 comments on commit 6f9f45c

Please sign in to comment.