コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
8242 ビュー

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.

アバター
破棄

Is this possible in odoo 16 Saas without customization

著作者 最善の回答

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!

アバター
破棄
最善の回答

In create() method you can append it

アバター
破棄
関連投稿 返信 ビュー 活動
1
5月 25
2419
1
9月 24
1335
1
6月 23
2320
1
4月 23
11393
1
6月 22
2653