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