Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
8174 Vizualizări

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.

Imagine profil
Abandonează

Is this possible in odoo 16 Saas without customization

Autor Cel mai bun răspuns

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!

Imagine profil
Abandonează
Cel mai bun răspuns

In create() method you can append it

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mai 25
2362
1
sept. 24
1300
1
iun. 23
2283
1
apr. 23
11348
1
iun. 22
2599