コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
2452 ビュー

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.

関連投稿 返信 ビュー 活動
1
3月 24
2630
0
3月 24
3032
2
4月 25
3762
2
1月 25
3551
1
3月 24
3090