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

If I am upgrading the module account, why does Odoo try to remove the records I created manually?

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
accountupgradedeleteconstrainterror
1 Odpowiedz
8626 Widoki
Awatar
chesucr

I just wanted to make sure that upgrading the `base` or `account` module everything works fine, because if I pull new changes to the module I want to upgrade the database in a future.


I have created new records manually on the model `account.acount.type`. But when I try to upgrade the `account` module, the exception written at the bottom of this question is raised. Odoo is trying to remove records from that model. Why is this happening?


I have installed the account module, but I did not removed any record from that table, I've only added a few more types. So the [expected behaviour of upgrading modules with data is](https://www.odoo.com/forum/help-1/question/what-does-noupdate-mean-in-the-following-xml-statement-data-noupdate-1-88009):


> noupdate means when second time this module will upgraded, this record will not be updated again. The record which is inside noupdate="1" will be initialized only at installation time.  

> 

> Tip: In case if you delete the record then at next update system will Re-create it. Usually those kind of records which are having possibility of modification from front end, given inside noupdate=1. For example, automatic scheduler records. 

    <data noupdate="1">
        <!-- account.account.type -->
        <record model="account.account.type" id="data_account_type_receivable">
            <field name="name">Receivable</field>
            <field name="type">receivable</field>
            <field name="include_initial_balance" eval="True"/>
        </record>
        <!-- [...]  -->


This is the raised error on the log while upgrading the account module


    2018-12-11 20:35:31,729 18018 INFO db_name odoo.addons.base.ir.ir_model: Deleting 59@account.account.type (l10n_es.account_type_third_parties)
    2018-12-11 20:35:31,760 18018 ERROR db_name odoo.sql_db: bad query: b'DELETE FROM account_account_type WHERE id IN (59)'
    ERROR: null value in column "user_type_id" violates not-null constraint
    DETAIL:  Failing row contains (14927, Account name or description, null, 4, f, null, other, null, f, null, 1, null, 1, 2018-12-11 18:10:24.091826, 1, 2018-12-11 18:10:24.091826, t).
    CONTEXT:  SQL statement "UPDATE ONLY "public"."account_account" SET "user_type_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "user_type_id""
    2018-12-11 20:35:31,763 18018 WARNING db_name odoo.modules.loading: Transient module states were reset
    2018-12-11 20:35:31,763 18018 ERROR db_name odoo.modules.registry: Failed to load registry
    Traceback (most recent call last):
      File "/path/to/odoo/src/modules/registry.py", line 85, in new
        odoo.modules.load_modules(registry._db, force_demo, status, update_module)
      File "/path/to/odoo/src/modules/loading.py", line 414, in load_modules
        env['ir.model.data']._process_end(processed_modules)
      File "/path/to/odoo/src/linked/base/ir/ir_model.py", line 1628, in _process_end
        record.unlink()
      File "/path/to/odoo/src/models.py", line 2935, in unlink
        cr.execute(query, (sub_ids,))
      File "/path/to/odoo/src/sql_db.py", line 155, in wrapper
        return f(self, *args, **kwargs)
      File "/path/to/odoo/src/sql_db.py", line 232, in execute
        res = self._obj.execute(query, params)
    psycopg2.IntegrityError: null value in column "user_type_id" violates not-null constraint
    This is raised because the account type is being used by some account.


Questions

  • So the only solution is to use the already existing account types instead of creating new ones?

  • Is there a place in the source code where this unlinking action is made? Does anyone know?

  • Is this the normal behaviour?


Note: I have imported the chart of accounts manually from scratch

0
Awatar
Odrzuć
Awatar
Pranav P S
Najlepsza odpowiedź



1
Awatar
Odrzuć
chesucr
Autor

If you read my question you will realise that I am not asking what you think. Anyway I got my answer here https://stackoverflow.com/questions/53732572/why-is-the-account-module-upgrade-unlinking-records-on-some-tables

Pranav P S

Good to hear that.

Anyway its better not to upgrade the base modules

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 delete account?
account delete
Awatar
0
cze 24
9
DELETE MY ACCOUNT IN ODOO
account delete
Awatar
Awatar
1
kwi 23
57
How to delete my user account Rozwiązane
user account delete
Awatar
Awatar
1
gru 23
20014
Ho do i delete a duplicate Open ERP Account
account delete duplicate
Awatar
0
mar 15
4045
Account denies to be deleted?
account delete problem odoo9
Awatar
0
cze 16
3841
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