Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
2943 Visualizações

I want to change the sequential field in the below image with a new field that I've created. Any idea on changing this one? Please advise.

For example: 

      the Header name of the example image below is 11000018 i want this header to be same as the above sequential name LocSO037. How will i going to do that if they use different class? any suggestions please

 

Avatar
Cancelar
Melhor resposta

You have to go to Settings -> Technical -> Sequences &Identifiers -> Sequences and find Purchase Order record - you can change there to whatever you need it to be. 

For existing records, you would have to do that via database, ie. for this record it would be like 'UPDATE purchase_order SET name='xxx' where name='PO00002';

Avatar
Cancelar
Autor

is there any way to do it in codes? do you have any idea? thanks in advance..

You have to modify function create in purchase_order model - it has name creation in it - check out lines 313-319 in this file - https://github.com/odoo/odoo/blob/master/addons/purchase/purchase.py