Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
6376 มุมมอง

Hello, 


I am having a problem of creating an automated action in front end. 

I preparation I have created a customized checkbox "Default Stage" to project stages.

I want to create an automated action as follows:

When a new project is created it is added to all default stages.


Your help is much appreciated!

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Terje:

Define the automated action with the following settings:

Model: Project

Trigger Condition: On Creation

Action To Do: Execute Python Code

Python Code:

default_stages = env['project.task.type'].search([('x_studio_default_stage_1', '=', True)])
record['type_ids'] = [stage for stage in default_stages.mapped('id')]

อวตาร
ละทิ้ง
ผู้เขียน

Hi Paresh! Thank you for your reply! I just sat behind my desk ready to start trying something like that!

Will let you know how I succeeded.

คำตอบที่ดีที่สุด

Hi Terje,


did you succeed?  I'm having the same problem  that i'm trying to solve.


kr,

roeland

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

go to automated action i try to solve this from there. some info here. https://odootricks.tips/automated-actions-create-tasks-sales-order-lines/

อวตาร
ละทิ้ง
ผู้เขียน

Hi Mindaugas! Thank you for your reply! I went trough this trick and tips document but I am still kind of confused how to define different fields.

yes. it is not straight and easy. do i understand correct. project stage default different?

ผู้เขียน

I'm very noob on all this so probably my head doesn't work in right directions :D

I have created checkbox x_studio_default_stage_1

Now when new Project is created I would like it to be added to Default Stages. Maybe I have to to it trough "execute python code"

try easier. i think better to let make configuration to people who work on it :)

so turn on debug (settings/under right corner) and when go to stage. default stage by odoo is working on sequences. so 1 will be default. you can create different stages and assign to projects and make the same. this work not perfect but works. the situation in CRM is the same

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 23
2394
2
มี.ค. 23
2526
2
ก.ค. 24
7850
1
พ.ค. 25
682
0
มี.ค. 25
916