Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
8383 Widoki

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.

Awatar
Odrzuć

Is this possible in odoo 16 Saas without customization

Autor Najlepsza odpowiedź

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!

Awatar
Odrzuć
Najlepsza odpowiedź

In create() method you can append it

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 25
2544
1
wrz 24
1475
1
cze 23
2471
1
kwi 23
11564
1
cze 22
2815