Hello,
I have created a custom field "purchase.order" under the Task model. I want all the tasks with the same project title to duplicate the value I put for the field "purchase.order". How should I write the python expression? Thank you.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I have created a custom field "purchase.order" under the Task model. I want all the tasks with the same project title to duplicate the value I put for the field "purchase.order". How should I write the python expression? Thank you.
Hello Lichao,
You can duplicate the value of Purchase Order Field using Automated Action.
Find Example in comment.
Hope it will be helpful to you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Please find code here :-
For Example -
Note - Check Indentation of the code after pasting the code.
- Create an automated action by adding
name, model( Task (project.task) as per your requirement),
trigger(update as per your requirement), Trigger fields (Purchase Order (project.task) - Purchase Custom Field as per your requirement), Action To Do ( Execute Python Code ).
- In the Python Code Below Paste this code:-
for rec in records:
for task in rec.project_id.task_ids:
task.write({
'purchase_order_id':rec.purchase_order_id,
})
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
Automated Action: Change task stage
Rozwiązane
|
|
1
cze 22
|
6419 | |
|
1
mar 15
|
4757 | ||
|
3
cze 25
|
2296 | ||
|
0
maj 24
|
1540 | ||
|
0
kwi 24
|
1258 |