Skip to Content
Menú
This question has been flagged
2 Respostes
2417 Vistes

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 



Avatar
Descartar
Best Answer

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


Avatar
Descartar
Autor

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

Autor Best Answer

Thanks.

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

Thanks 

Avatar
Descartar

You can use On save option instead of On creation.

Related Posts Respostes Vistes Activitat
1
de març 24
2594
0
de març 24
3009
2
d’abr. 25
3704
2
de gen. 25
3496
1
de març 24
3053