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

hello,

I am trying to work this rule below but i am not sure its possible, 

  1. create a quotation
  2. in the quotation a project is link 
  3. send the quotation by email
  4. once the quotation is sent, create a (follow up) task in the budget section of the project & schedule it in 2 days time.

is this possible to do ? 


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

Hi,



Yes, it is possible to automate this workflow and you can achieve it using automated actions. Here's how:


    Ensure a Project is Linked to the Quotation:


    Add a field to link a project (project_id) to the quotation if it’s not already there.

    Set Up an Automated Action:


    Go to Settings > Technical > Automation > Automated Actions and create a new action.


    Set the Model to sale.order (Quotation).

    Trigger the action "On Update" when the quotation is sent.

    Use the following Python code:

    if record.state == 'sent' and record.project_id:

        task_vals = {

            'name': 'Follow-Up on Quotation %s' % record.name,

            'project_id': record.project_id.id,

            'date_deadline': fields.Date.today() + relativedelta(days=2),  # Schedule in 2 days

            'user_id': record.user_id.id,  # Assign to the salesperson

            'description': 'Follow up on the quotation sent to the customer.',

        }

        self.env['project.task'].create(task_vals)


Hope it helps

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 25
581
1
ต.ค. 23
1128
0
พ.ย. 22
1505
2
ม.ค. 23
2966
0
พ.ค. 25
1065