İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

[18.0] How can I add a sequence to the lines in my sale order, invoice or purchase order?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
salespdfsale.order.linequickstartQuickstart
3 Cevaplar
6574 Görünümler
Avatar
Orlanda Rodríguez Montenegro (orrm)

I want to add a sequence to my sale order that addds a numerator on each line starting at 1. I'd like it to be on my sales PDF and in the view so the customer can make reference to a specific line.

0
Avatar
Vazgeç
Marcucci Jeremy

Good afternoon, 

Thanks a lot for all the explaination. I need it also for my order.

I have a small difference compare to the original asking, I need to start from 10 and increase each line by 10.

For example line 1 will be 10, line 2 will be 20, etc. Is it possible to make it ? I search all the day for it... 

I'm on odoo sh.

Thanks for your help and have a nice day.

Jeremy

Dinesh Hassani

I tried Ken's version and got success on all fronts, but couldn't get it on printed reports.... help if you know any better. I am using Odoo 19.

Avatar
Orlanda Rodríguez Montenegro (orrm)
Üretici En İyi Yanıt

Part 1: (V.18) Add the sequence number for each item/product in the sales.order.line model. 


  1. From the sales.order model go to Studio.

2. Click on the “Edit list view” button to go to the sale.order.line model 


3. Add a related field to “sequence”.

4. Activate the Developer Mode

5. (Best practice) Change the label and then the technical name. 

Extra tip: When you finish typing the label, type "enter", wait for studio to load and it's coppied to the technical name.



6. Go to the a Sale Order and add a product in the sale lines to see how it works. 

We haven´t finished! The sequence starts with the number 10 and we need it to start from 1) Please go to the next step



7. In order to predefine the number 1 for the sequence as the default. Go to Settings / Technical / Actions / Use-defined defaults

8. Create a new User-defined Default 

  • Add the field: Sequence (Sales Order Line) -> You might need to search for it on the "search more" option
  • Default value: 1

If you don't find the field "search more" with these values: field: sequence, model: sale.order.line


9. Go to the sale.order model and see how it works. 


Note: You need to save it, in order to have a correct sequence. If you don't save it, you will always have the number 1 in the sequence field. 

Once it's saved you will have the correct sequence. 



Forum post part 2:

(V.18) How to add the sequence to the PDF?

  1. From the sale.order model go to Studio and find the reports you want to add the sequence field.


2. Insert a field 


3. Change the name of the field

4. In the rectangle below Type “/” and select “field”

5. Add the native field of Sequence (integer): 

6. Don´t forget to Save it 


7. Print the PDF and the sequence field will be shown.



8
Avatar
Vazgeç
Ahmed khalifa

I followed the same steps but it shows 1 , 1 , 1 for the line items then when i save it shows again 10,11,12
i compare the field: sequence which you made with mine, your screenshot shows the type is Base Field but mine shows it's Custom Field.
Could that be the problem?

Chris TRINGHAM

The Base Field is used on the pdf. It's already shown on the Form View but with a drag handle to re-sequence lines, so a new related field is added.

Probably you are trying to set the default value to 1 on the new related field, it needs to be on the Base field.

Christine Nguyen

Thank you, your solution is great. I followed it, but when I save, the sequence still stays as 1, 1, 1. It only reorders automatically when I drag and drop a line. How can I make it automatically adjust the sequence numbers 1, 2, 3 when I save the SO?

AljawahirSteel

when i add sequence field in report start the 0 not 1?

Apiuser

Is this possible to set up on CE?

Avatar
Ken Nguyen
En İyi Yanıt

For those who are still struggling with these solutions, I combined both methods, and it seems to work.  I used Sai's method up to the Sales Order Code.  I couldn't figure out which model the Invoice code was supposed to be on.  I also created the same code for the Purchase Order model.

i = 1
for line in record.order_line.sorted (key = lambda l: l.sequence):
    if not line.display_type:
        line.write ({'x_studio_line_number': i})
        i += 1

To get it to show on the Sales Quote or Purchase RFQ pdf, I used the part 2 instructions from Orlanda.  When you get to step Part 2 - Step 5, search for the Label or the Technical Name that you created from Sai's Step 1.  In my case, my Label is just "Line" while the technical name is "x_studio_line_number".  Once saved, it should now update the correct sequence.  Replicating other reports is the same process.  Go to the report, add a field, search for the field, and select the right label.  You don't need to redo Sai's step.

0
Avatar
Vazgeç
Avatar
Sai Praveen
En İyi Yanıt

1.Create a custom integer field on the line model (e.g., x_studio_no for sale order lines).

  • Go to Studio → Sale Order → Order Lines → Add a field (Integer).
  • Label it something like "Line Number" or "S.No."

2.Create an Automation Rule

  • Go to: Settings → Technical → Automation → Automated Actions.
  • Create a new rule:
    • Model: Sales Order
    • Trigger: On Save
    • Apply On Domain: leave it empty or match active orders
    • Add Server Action: Execute Python Code




  • Sample Code for Sale Order Lines:


  • Sample Code for Invoice Lines:



Note:The sequence field will show 0  before saving.It gets updated only after you save the record, because the automation is triggered On Save.



-3
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
How to use the PDF Quote Builder and add Dynamic Fields with LibreOffice? [V17] Çözüldü
sales pdf quickstart Quickstart
Avatar
Avatar
Avatar
3
Haz 25
7886
adding custom field in quotation/invoice
sales pdf
Avatar
Avatar
1
Kas 25
386
How do I connect the Epson TM-T88VII to Odoo?
quickstart Quickstart
Avatar
Avatar
2
Eki 25
865
How to Set Customer-Specific Product Names Çözüldü
quickstart Quickstart
Avatar
1
Ağu 25
1339
Odoo 18 Quotation Builder Header/Footer Print Problem Çözüldü
sales pdf
Avatar
Avatar
2
Ağu 25
4431
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now