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

Hi, 

Currently we are using odoo 13. we created python code for auto seq in sales crm . 

Currently i exploring the Odoo 17, and I use the below steps to add the auto seq.  But it didnot work.   and there is not error .. Please advise

1. Customer fields   - 

   x_enquiry_number 


Sequence (added): 


Automated action 


Below code added in the execute code section

Execute code: 

if not vals.get('x_enquiry_number'): 

         vals['x_enquiry_number'] = self.env['ir.sequence'].next_by_code('enquiry.seq') 



Thanks 



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

Hello Arul,

Please review and test the provided code; it could be helpful for your purposes.
Write the automated action on creation and remove the condition.
vals['x_enquiry_number'] = env['ir.sequence'].next_by_code('enquiry.seq')

Thanks,
info@creyox.com


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

Thanks
Trigger On creation is not found in the automated action (odoo 17)

ผู้เขียน คำตอบที่ดีที่สุด

Thanks.

Trigger "On Creation" not listed in the automated action/rules.. 

Thanks 

อวตาร
ละทิ้ง

You can use On save option instead of On creation.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 24
2654
0
มี.ค. 24
3051
2
เม.ย. 25
3795
2
ม.ค. 25
3577
1
มี.ค. 24
3112