Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
8243 Ansichten

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
Verwerfen

Is this possible in odoo 16 Saas without customization

Autor Beste Antwort

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
Verwerfen
Beste Antwort

In create() method you can append it

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Mai 25
2420
1
Sept. 24
1337
1
Juni 23
2320
1
Apr. 23
11393
1
Juni 22
2654