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
Про цей форум
Допомога

Odoo 15 Inherit "product.product" get issue bad query: ALTER TABLE "product_product" ALTER COLUMN "base_unit_count" DROP NOT NULL

Підписатися

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

Це запитання позначене
inheritproduct.productv15
1 Відповісти
3814 Переглядів
Аватар
fudo

[RESOLVED - FOUNDED THE TRUE ISSUE]


Hi,


I'm trying to inherit model "product.product", but with my first move, i got the issue, here's my code:



from odoo import models, fields

class ProductProduct(models.Model):
_inherit = "product.product"


The issue:


bad query: ALTER TABLE "product_product" ALTER COLUMN "base_unit_count" DROP NOT NULL
canceling statement due to statement timeout issue above


Any idea? Thanks.


EDIT 1: After a day without doing anything, and now it working just fine. I don't know why.

EDIT 2: After few hours, the issue is back when i'm trying to inherit model "product.product" one again, and this time i've tried to uninstall and reinstall my custom module, and the issue is gone again, everything is seem normal now.

How i uninstall and reinstall the module?
=> Run this command in postgresql (this command is to prevent the "canceling statement due to statement timeout" issue above):

set statement_timeout = '60 s'; -- 60 seconds

Then, remove the "-u module_name" in configuration in pycharm so it won't upgrade module automatically when you restart the server.

Then, run the server and uninstall and reinstall the module manually.

I've fixed this issue by above WORK AROUND, but this is not the correct method to resolve this problem, so if anyone know anything about this issue, welcome.


EDIT 3: I've found the true issue here, but it's not related anything with "product.product". Turn out, it's because of my copied code from other modules which causing this issue.


The original copied code are:





status = fields.Integer(string='Status', size=4)



But in odoo 15, it should not have `size`, so it look like this:



status = fields.Integer(string='Status')



I thing that this code is causing the issue so that "product.product" code can't run normally.

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

I've found the true issue here, but it's not related anything with "product.product". Turn out, it's because of my copied code from other modules which causing this issue.


The original copied code are:





status = fields.Integer(string='Status', size=4)



But in odoo 15, it should not have `size`, so it look like this:



status = fields.Integer(string='Status')



I thing that this code is causing the issue so that "product.product" code can't run normally.

Also, you can try to increase the value of limit_time_cpu and limit_time_real to 600000 and 12000000 in odoo.conf to ignore this issue.

0
Аватар
Відмінити
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 Відповіді Переглядів Дія
Database fetch misses ids ((<NewId origin=56101>,)) and has extra ids ((56101,)), may be caused by a type incoherence in a previous request Вирішено
inventory product.product v15
Аватар
Аватар
1
вер. 24
4248
How to change used product model in invoice lines with odoo 15
product.product account.move.line v15
Аватар
0
груд. 22
4050
How to inherit button type="action" odoo 15 Вирішено
inherit button v15
Аватар
1
квіт. 22
8107
i create a object inherit from product.product,but the field not shows in the view
view inherit product.product
Аватар
Аватар
Аватар
Аватар
3
бер. 15
10528
Is the external ID of product.product automatically generated when importing products into product.template? Вирішено
import csv product.product v15
Аватар
Аватар
Аватар
Аватар
3
лист. 23
7273
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
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