Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Guest House
    • Drankenhandelaar
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Solar Energy Systems
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC Services
    Others
    • Nonprofit Organization
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

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

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
inheritproduct.productv15
1 Beantwoorden
3800 Weergaven
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
Annuleer
Avatar
fudo
Auteur Beste antwoord

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
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Database fetch misses ids ((<NewId origin=56101>,)) and has extra ids ((56101,)), may be caused by a type incoherence in a previous request Opgelost
inventory product.product v15
Avatar
Avatar
1
sep. 24
4243
How to change used product model in invoice lines with odoo 15
product.product account.move.line v15
Avatar
0
dec. 22
4041
How to inherit button type="action" odoo 15 Opgelost
inherit button v15
Avatar
1
apr. 22
8081
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
mrt. 15
10516
Is the external ID of product.product automatically generated when importing products into product.template? Opgelost
import csv product.product v15
Avatar
Avatar
Avatar
Avatar
3
nov. 23
7253
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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