Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
2912 Visualizzazioni

Hello,

I have create a sequence with our problem but I do not know how to apply it to a given field i.e. I would like my customer references (field 'reference' of contact) to follow that sequence. 

Does anyone know how to link a sequence to a field?


Thank you so much for your help!

Avatar
Abbandona
Autore

Thank you very much, both of you!

Risposta migliore
you can apply like this:

name = fields.Char(string='Number', required=True, copy=False, default=lambda self: self.env['ir.sequence'].next_by_code('account.reconcile'))


Avatar
Abbandona
Risposta migliore

Hi,

If you are looking to do it from the code, you can see this video explaining the same: https://www.youtube.com/watch?v=yruFgeKag3s&list=PLqRRLx0cl0homY1elJbSoWfeQbRKJ-oPO&index=18

Also it can be done from the user interface using automated action, if you need to do it from user interface, see this: https://www.youtube.com/watch?v=Cz5eM5FDmTE&list=PLqRRLx0cl0hq6DeOzGlfHyjgBxjN5jW90&index=1

Thanks

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
feb 23
5004
0
gen 23
94
1
ott 22
4308
0
apr 22
2846
2
apr 25
13138