Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Lines in Sale Orders don't respect order in which they are entered

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
invoicesequenceorderlinesopenerp7
3 Odpowiedzi
9918 Widoki
Awatar
Santi

When I enter new lines in Sale Orders they are ordered correctly, but as soon as I click either the update or save buttons, the sequence in which the lines where ordered gets messed up.

I would like the lines to respect the order in which I enter them. How can I accomplish this? or am I the only one this issue?

1
Awatar
Odrzuć
Awatar
Zbik
Najlepsza odpowiedź

See: How to reorder lines in a quotation? 

UPDATE:

or you change default sort oder for sale.order.line from

_order = 'order_id desc, sequence, id' 

 to other, which suits you. For example:

class sale_order_line(models.Model): 
   _inherit = 'sale.order.line'
   _order = 'order_id desc, id'

 


-1
Awatar
Odrzuć
Santi
Autor

Thanks zbik, I already saw that, and use it on a daily basis, but that does not solve the core problem I have.

Santi
Autor

My problem is that the lines do not maintain the order in which they are entered. I initially thought it was a misbehavior caused by one of the modules I had installed, but I created a new empty database with the very basic official modules installed and the same problem appeared to occur....so I'm really surprised I'm the only one complaining about it.

Zbik

@Rachid answer is for you, sequence field value determines order.

Zbik

... and ... if you drag and drop the default sequence value change.

Santi
Autor

The behavior I've noticed is the following, if you enter each product line continuously by clicking "Add an item" and add all items one after another without abandoning the "Create: Order Lines" form by clicking "Save & New", once you're done entering them all this way and click "(update)" or "Save" the Sale Order, the items respect the order in which they where entered. BUT, if for example you add an item by clicking "Add an item" then click "Save & Close" on the ""Create: Order Lines", once you start adding items again, any new items you add will appear after the first line entered in the Sale Order one you save or update it, instead of being places after the LAST line in the sequence they have been added. This behaviour is very annoying specially when creating a quotation with many items, it can get all messed up and you have to drag and drop each item to place them in the intended order.

Santi
Autor

Yes, if I drag and drop the sequence changes....but I shouldn't have to drag and drop! that's the thing. The lines should be respect the order in which they are entered...one after the other. Dragging and dropping should only be used if you want to modify the intended sequence later on.

Zbik

answer updated

Santi
Autor

Thanks. I had tried that as well, that way the order of the lines work as it should....but, drag and drop does not work, since the sequence of the lines isn't taken into account. So I discarded that option as well....

Santi
Autor

I have been further troubleshooting this, and there's some kind of obvious bug in the way the sequencing works. If you look in the database (PGAdmin3) in sale_order_line table, you'll see that if you add several items, the sequence increments, for example 10 (Item 1), 11 (Item 2), 12 (Item 3), 13 (Item 4)....but once you save or update the Sale Order, and then edit and add new lines, the sequence always starts at 11, for example 10 (Item 1), 11 (Item 5), 12 (Item 6), 13 (Item 2), 14 (Item 3), 15 (Item 4) .......when it should be as follows 10 (Item 1), 11 (Item 2), 12 (Item 3), 13 (Item 4), 14 (Item 5), 15 (Item 6)

Santi
Autor

Does anyone else have this issue...or is it just me? As I mentioned earlier, I tried on a new empty database...and the same issue applies, so I don't think it's only me....

Zbik

In my system V8 all sequences value = 10, without drag and drop. V7 or V8? Field sequence is INTEGER can not change for no reason!

Santi
Autor

Ok, you are right zbik, I narrowed it down to the module "nan_product_pack" being the one causing this misbehavior. The module increments the sequence per line, and in the process messes up the order. For some reason I installed this module in the new database as well and forgot I had done so later on....sorry for all the fuss, and thanks for you help zbik and Rachid, I'll try to figure out how to fix "nan_product pack" as it's an essential module in our business...

Awatar
Santi
Autor Najlepsza odpowiedź


Hi Rachid (sorry, I can't comment your post, as I need 50 karma points to do so),

I'm aware of the default sequence number, and that you can change it in sales.py file...or through a module. I'm also aware that you can reorder the lines by dragging and dropping them manually after they've been messed up. But what I don't understand is why the lines don't stay in the order I've added them by default.

For example, I add:

Line 1

Line 2

Line 3

I expect it to stay as:

Line 1

Line 2 

Line 3

and not as this, which is the actual behaviour:

Line 1

Line 3

Line 2

There doesn't seem to be much logic behind this default behaviour.

So far I haven't found many posts complaining about this issue, so I'm starting to suspect it might be a behaviour specific to my OpenERP installation. Is anyone else facing this issue (line order being messed upon save or update of the order/invoice/picking)?



1
Awatar
Odrzuć
Tommy Lo

the same we are facing at Odoo 11

Awatar
Rachid
Najlepsza odpowiedź

you can sort them with using the sequence field

the sequence take a default number=10

so if you want to make a line first you can put a minum sequence number like:

1st line : sequence=8

2nd line : sequence=9

3rd line : sequence=10

 

 

0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Invoice lines and sale order lines relation Rozwiązane
invoice order lines
Awatar
Awatar
2
lip 20
28374
How to export data by sequence?
invoice export data sequence order
Awatar
Awatar
Awatar
Awatar
3
lut 25
5368
How to change Invoice sequence via xml in Odoo 15 or newer?
invoice sequence
Awatar
0
wrz 24
2107
Odoo 17.1 - How to never reset invoice number
invoice sequence
Awatar
Awatar
2
mar 24
4038
How to select manually a sequence for an invoice? Rozwiązane
invoice sequence
Awatar
Awatar
2
lut 23
4651
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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