Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

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

Odebírat

Get notified when there's activity on this post

This question has been flagged
inheritproduct.productv15
1 Odpovědět
3803 Zobrazení
Avatar
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
Avatar
Zrušit
Avatar
fudo
Autor Nejlepší odpověď

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
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Database fetch misses ids ((<NewId origin=56101>,)) and has extra ids ((56101,)), may be caused by a type incoherence in a previous request Vyřešeno
inventory product.product v15
Avatar
Avatar
1
zář 24
4243
How to change used product model in invoice lines with odoo 15
product.product account.move.line v15
Avatar
0
pro 22
4047
How to inherit button type="action" odoo 15 Vyřešeno
inherit button v15
Avatar
1
dub 22
8092
i create a object inherit from product.product,but the field not shows in the view
view inherit product.product
Avatar
Avatar
Avatar
Avatar
3
bře 15
10518
Is the external ID of product.product automatically generated when importing products into product.template? Vyřešeno
import csv product.product v15
Avatar
Avatar
Avatar
Avatar
3
lis 23
7259
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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