bemade_fsm: bug fix in new_task_from_template.py default_get

This commit is contained in:
Marc Durepos 2023-12-05 11:43:24 -05:00
parent 0806bc96f0
commit 6ab1bda2b7

View file

@ -30,8 +30,7 @@ class NewTaskFromTemplateWizard(models.TransientModel):
active_model = self.env.context.get('active_model', False)
if not active_model:
params = self.env.context.get('params', False)
active_model = params.get('model', False)
active_model = params and params.get('model', False)
if active_model == 'project.task.template' and active_id and 'task_template_id' in fields_list:
res.update({'task_template_id': active_id})
if active_model == 'project.task' and 'project_id' in fields_list: