Skip to Content
Menu
This question has been flagged
2 Replies
8206 Rodiniai

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.

Portretas
Atmesti

Is this possible in odoo 16 Saas without customization

Autorius Best Answer

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!

Portretas
Atmesti
Best Answer

In create() method you can append it

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
geg. 25
2390
1
rugs. 24
1323
1
birž. 23
2312
1
bal. 23
11378
1
birž. 22
2637