Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3 Vastaukset
3654 Näkymät

Hello,

I need to create an automated action that runs, when a new project was created. The automated action should create a new task within the new created project.

The automated action I created runs On Creation of a new project and creates a new task with the correct name, but the field project_id stays empty. What do I have to do in my automated action in order to the field project_id = project_id of the newest project?


Avatar
Hylkää

Please post the code of OnCreation of a Project.

Tekijä Paras vastaus

Hi,

I created the automated action via Odoo UI.

I think, I'll need a python expression in order to always link the correct project, but I don't know, how this expression should look like.

I set name of automated action = Create new Task

Model = Project
Action To Do = Create a new Record
Create/Write Target Model = Task
Trigger Condition = On Creation
Apply On = All Records

Data to write

Field Task Title = New Task
Field Project = <this is where I don't know what to add here>
Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
huhtik. 24
2119
1
syysk. 23
1983
5
heinäk. 20
5899
0
maalisk. 17
3124
1
jouluk. 23
4684