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

Hi everyone,

   What would the right way to add odoo fields as prefix in sequence? I want to use Internal Reference field (ref; res_partner) as prefix to order number sequence code, so i know straight ahead who is the customer by looking at order number. 

Thanks in advance.

Avatar
Abbandona

Is this possible in odoo 16 Saas without customization

Autore Risposta migliore

Sorry, took me a while to come back to this. Which file should I be working on? Sorry, i'm new to odoo. Where does it keep sequence setting for sales orders?

ok, i found file ir_sequence.py, where i should add my field (by the way, field i want to show in sequence is "doc.partner_id.ref". How can i define it and make it work as, let say %(ref) in my sequence settings? Thanks!

Avatar
Abbandona
Risposta migliore

In create() method you can append it

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mag 25
2432
1
set 24
1341
1
giu 23
2325
1
apr 23
11397
1
giu 22
2672