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

Manufactoring order sequence?

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
mrpsequencenumbering
3 Odpowiedzi
8917 Widoki
Awatar
Elevenmidia

Dear all, I need your help with a problem I am having on Manufacturing Order Sequence Number The problem is that, everytime I click Create and then Discard the document, the sequence number increases. This is bad, because the Manufacturnig Order was discarded and not Saved. If I click on Create and then Discard several times, the sequence number will increase the number of times clicked.

How can I prevent OpenERP, from doing it and just increase the number when Manufacturing Order is saved?

I have been searching the forum, and found a "closed" post:

help.openerp.com/question/22373/control-on-autogenerated-sequence-number/

Unfortunetly this is not very clear for a newbie like me.

What I have tried to do:

  1. On my mrp.py file:

Found the line " 'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/', " on my "class mrp_production(osv.osv)". The full _defaults statement is below.

_ defaults = {
    'priority': lambda *a: '1',
    'state': lambda *a: 'draft',
    'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
    'product_qty':  lambda *a: 1.0,
    'user_id': lambda self, cr, uid, c: uid,

    THE BELOW LINE

    'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/', 

    THE ABOVE LINE

    'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
    'location_src_id': _src_id_default,
    'location_dest_id': _dest_id_default
}

But the problem is that I do not know how will I override de create() method according to instructions from the post. I do not find a create() method on mrp.py file. The instructions say that I should override this method with the following code:

(where to put this code)

def create(self,cr,uid, vals,context=None):
    vals = {}
if context is None:
    context = {}
vals['name'] = self.pool.get('ir.sequence').get(cr, uid, 'object.object')
return super(object, self).create(cr, uid, vals, context=context)

" Paulo

0
Awatar
Odrzuć
Awatar
Ray Carnes
Najlepsza odpowiedź

You can change the Implementation option on the sequence to NOT ALLOW gaps in the sequence.

Do this via the menu sequence Settings -> Technical -> Sequences and Identifiers -> Sequences

The example below is for Invoices via the Sales Journal, but if you open the sequence for Manufacturing Orders you will see the same type of record:

image description

You can see the things you can modify about a sequence are:

  1. Fixed or date/time based prefix characters
  2. Fixed or date/time based suffix characters
  3. The total number of numerals in the number (padding) ie: 001 or 000001
  4. The increment used for the next number in the sequence
  5. The next number used for the numeric part of the sequence

  6. Whether to allow gaps in the sequence (this is what you want to modify)

0
Awatar
Odrzuć
Elevenmidia
Autor

I have tried that already Ray. The problem is that the sequence number is achieved when you click Create and not when you save the production order. If you click on Create and Discard several times you will see that the sequence number increases everytime. This way, when you click on save the manfactoring order will be saved with the last number received. I need to change it in ways to get the correct number just when you say Save or Confirm Production.

Ray Carnes

Understood. Take a look at the way Invoice numbers are assigned, at SAVE time, not at CREATE time.

Elevenmidia
Autor

Yes Ray, I have noticed that. The invoice number is achieved at save time and the manufacturing order gets the number at the create time. This is what I really need to change. I need to change the mrp behavior to achieve the number on save time and not at create time. Thank you once again

Awatar
Daniel Santos
Najlepsza odpowiedź

Same problem here. I found this answer, maybe could help you:

http:// help.openerp.com/question/22373/control-on-autogenerated-sequence-number/

Thanks!

0
Awatar
Odrzuć
Awatar
Med Said BARA
Najlepsza odpowiedź

You should read this response on stackoverflow

The problem is more general read this

Patching, is not a solution in this case.

The question should be raised for the core team in Launchpad .

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ść
How to modify existing sequence parameters?
sequence account.invoice numbering
Awatar
Awatar
Awatar
2
kwi 24
18106
How to change Quality Control Point Sequence
mrp sequence quality
Awatar
0
cze 19
4577
How to change the behavior of bank statement line numbering?
sequence bank_statement numbering
Awatar
0
cze 15
6140
v 10: numbering sequence of invoices interrupted
sequence invoicing numbering jumps
Awatar
0
cze 21
2350
Odoo 17 Bom can't import with Produit / ID externe
mrp
Awatar
Awatar
Awatar
2
sie 25
2063
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