Hello, I have records copied from a create function, I want the number field to come out as a sequence and the attached code is not copied, currently it copies the / in all the records of the number field.
I would appreciate it if you could help me, thank you
/
@api.model defcreate(self, values):
result= super(Visit, self).create(values)
values['number'] = self.env['ir.sequence'].next_by_code('visit.visit') or'/'
if not result._context.get('from_copy') andlen(result.contacto_tag)>1: forrecordinresult.contacto_tag: result.with_context({'from_copy':True}).copy({'contacto_tag':[(4,record.id)]}) return result