Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
8222 Weergaven

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
Annuleer

Is this possible in odoo 16 Saas without customization

Auteur Beste antwoord

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
Annuleer
Beste antwoord

In create() method you can append it

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mei 25
2397
1
sep. 24
1326
1
jun. 23
2317
1
apr. 23
11386
1
jun. 22
2646