Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

[Solved] ERROR: Model 'training.custom' contains module data and cannot be removed!

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
deleteremovemodel
2 Відповіді
22316 Переглядів
Аватар
Siobhan

Really need help here..

I created this view and it didn't work out how I expected so I deleted it (along with the class in python) and now I cannot uninstall or reinstall the module as it is looking to this view.

I tried to delete from Odoo but got the error above. Can anyone help me remove this view?  (In a new DB this view does not exist)

0
Аватар
Відмінити
Аватар
omeedt
Найкраща відповідь

I don't know if you still need to solve this, but you can try executing sql queries.

  1. Log into SQL Shell (psql)

  2. select * from ir_model where name  = 'model_name';

  3. delete from ir_model_fields where model_id = 'model_id';

  4. delete from ir_model where id = 'model_id';

2
Аватар
Відмінити
Аватар
Yenthe Van Ginneken (Mainframe Monkey)
Найкраща відповідь

Hi Siobhan,

I sometimes run in to this issue too and it can be annoying. The easiest way is to simply delete the whole module (folder) that is under addons. After removing the module you'll have to update the whole database by re-starting your Odoo service. Do this as follows:

./odoo.py -u all 

Everything will be re-checked and loaded and your module should be gone.

0
Аватар
Відмінити
Siobhan
Автор

Thank you.. is there a way just to delete this view and keep the module?

Yenthe Van Ginneken (Mainframe Monkey)

You can 'always' remove a view by simply removing it from the XML file. The problem is that you've dropped your class, which contained the logic for your model (and database fields) and this is what triggered your module to the state where you couldn't update or delete the module. As long as you simply remove views in XML you shouldn't have any problems. Be careful when you delete classes though!

Siobhan
Автор

ah ok... I deleted both as it wasn't working they way I thought it would. So the problem is with the class removal not the view?

Yenthe Van Ginneken (Mainframe Monkey)

Usually a view can't give you any problems, since you're simply calling the data from the model and fields. I haven't ever had problems with those 'freezing' the whole module. When you've removed that class from the module, and removing the fields/model from the database it tried to drop all those fields but they had data in it and Odoo was unable to delete those. So that got your module 'stuck' and recovering those problems is really annoying. By the way, just a tip, always try to develop on a test machine! In case you crash it its not too much of a problem :)

Siobhan
Автор

Lucky for me I am on a test machine and that I saved the class (was going to tweak it later). I just readded them now and everything is running great.. Again Thank you

Yenthe Van Ginneken (Mainframe Monkey)

Its good to hear you still had the class, that makes things easier. No problem for the help, best of luck with the development!

Siobhan
Автор

Just very quick question. How do you delete a class correctly or is that not possible?

Yenthe Van Ginneken (Mainframe Monkey)

I think you should first uninstall the module (when its still working, obviously), then remove the class and then re-install it. I'm not 100% sure on this though, since I never had to. But in theory that should work.

Siobhan
Автор

In theory yes but in practice no.. You won't be able to uninstall the module without the missing class (That was my original problem). When I located the problem with uninstall, I couldn't delete the model. I will keep looking to see if there is a way as it seem a bit redundant to keep all the code just in case you need to uninstall a module

Thomas DUPORT

Hello @Yenthe Van Ginneken I have the same error "ERROR: Model '...' contains module data and cannot be removed!"

And I can't uninstall the module because of key error

I tried to "-u all" but it doesn't do anything...

Can you help me ?

Enjoying the discussion? Don't just read, join in!

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

Реєстрація
Related Posts Відповіді Переглядів Дія
Remove an entry of models Вирішено
remove model odoo11
Аватар
Аватар
Аватар
2
черв. 18
8142
Deletion of a model created via Studio (Odoo V15).
delete model studio v15
Аватар
Аватар
1
лют. 24
2928
How to remove view button from purchase and account email?
delete remove emailtemplate Odoo13.0
Аватар
0
жовт. 21
3055
delete button not appear in tree view Вирішено
treeview delete model odoo12
Аватар
Аватар
Аватар
2
січ. 20
10015
Remove search view for specific model
view search remove model
Аватар
0
черв. 19
5255
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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