-
-
Notifications
You must be signed in to change notification settings - Fork 623
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] mail_activity_team: Add responsible as activity team leader if …
…exists on server actions
- Loading branch information
1 parent
47ec998
commit abf6514
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# @author Iván Todorovich <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
from odoo import api, fields, models | ||
|
||
|
||
class IrActionsServer(models.Model): | ||
|
@@ -18,3 +18,8 @@ def _run_action_next_activity(self, eval_context=None): | |
if self.activity_user_type == "specific" and self.activity_team_id: | ||
self = self.with_context(force_activity_team=self.activity_team_id) | ||
return super()._run_action_next_activity(eval_context=eval_context) | ||
|
||
@api.onchange("activity_team_id") | ||
def onchange_activity_team_id(self): | ||
if self.activity_team_id.user_id: | ||
self.activity_user_id = self.activity_team_id.user_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters