Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Openupgrade - im trying to migrate odoo 14 to odoo 15 with openupgrade.

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
migrationopenupgradeOpenUpgrade
1 Rispondi
3244 Visualizzazioni
Avatar
Jenish M

While do so I got a error 

2023-10-04 05:43:14,215 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000350 running UPDATE ir_model_data SET module = 'web', name = 'external_layout_striped' WHERE module = 'web' and name = 'external_layout_background' 

2023-10-04 05:43:14,216 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000308 running UPDATE ir_model_data SET module = 'web', name = 'external_layout_bold' WHERE module = 'web' and name = 'external_layout_clean' 

2023-10-04 05:43:14,217 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000311 running UPDATE ir_model_data SET module = 'web', name = 'report_layout_striped' WHERE module = 'web' and name = 'report_layout_background' 

2023-10-04 05:43:14,217 13878 DEBUG odoo15 OpenUpgrade: 1 rows affected after 0:00:00.000236 running UPDATE ir_model_data SET module = 'web', name = 'report_layout_bold' WHERE module = 'web' and name = 'report_layout_clean' 

2023-10-04 05:43:14,256 13878 WARNING odoo15 odoo\\\\.modules\\\\.loading:\\\\ Transient\\\\ module\\\\ states\\\\ were\\\\ reset 

2023\\\\-10\\\\-04\\\\ 05:43:14,261\\\\ 13878\\\\ ERROR\\\\ odoo15\\\\ odoo\\\\.modules\\\\.registry:\\\\ Failed\\\\ to\\\\ load\\\\ registry 

2023\\\\-10\\\\-04\\\\ 05:43:14,262\\\\ 13878\\\\ CRITICAL\\\\ odoo15\\\\ odoo\\\\.service\\\\.server:\\\\ Failed\\\\ to\\\\ initialize\\\\ database\\\\ `odoo15`\\\\. 

Traceback\\\\ \\\\(most\\\\ recent\\\\ call\\\\ last\\\\):

 \\\\ File\\\\ "/opt/odoo15/odoo/service/server\\\\.py",\\\\ line\\\\ 1258,\\\\ in\\\\ preload_registries

 \\\\  \\\\ registry\\\\ =\\\\ Registry\\\\.new\\\\(dbname,\\\\ update_module=update_module\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/registry\\\\.py",\\\\ line\\\\ 87,\\\\ in\\\\ new

 \\\\  \\\\ odoo\\\\.modules\\\\.load_modules\\\\(registry,\\\\ force_demo,\\\\ status,\\\\ update_module\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/loading\\\\.py",\\\\ line\\\\ 470,\\\\ in\\\\ load_modules

 \\\\  \\\\ processed_modules\\\\ \\\\+=\\\\ load_marked_modules\\\\(cr,\\\\ graph,

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/loading\\\\.py",\\\\ line\\\\ 363,\\\\ in\\\\ load_marked_modules

 \\\\  \\\\ loaded,\\\\ processed\\\\ =\\\\ load_module_graph\\\\(

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/loading\\\\.py",\\\\ line\\\\ 198,\\\\ in\\\\ load_module_graph

 \\\\  \\\\ registry\\\\.setup_models\\\\(cr\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/modules/registry\\\\.py",\\\\ line\\\\ 290,\\\\ in\\\\ setup_models

 \\\\  \\\\ model\\\\._setup_fields\\\\(\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/models\\\\.py",\\\\ line\\\\ 3049,\\\\ in\\\\ _setup_fields

 \\\\  \\\\ field\\\\.setup\\\\(self\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/fields\\\\.py",\\\\ line\\\\ 462,\\\\ in\\\\ setup

 \\\\  \\\\ self\\\\.setup_related\\\\(model\\\\)

 \\\\ File\\\\ "/opt/odoo15/odoo/fields\\\\.py",\\\\ line\\\\ 538,\\\\ in\\\\ setup_related

 \\\\  \\\\ raise\\\\ TypeError\\\\("Type\\\\ of\\\\ related\\\\ field\\\\ %s\\\\ is\\\\ inconsistent\\\\ with\\\\ %s"\\\\ %\\\\ \\\\(self,\\\\ field\\\\)\\\\)

TypeError:\\\\ Type\\\\ of\\\\ related\\\\ field\\\\ base\\\\.document\\\\.layout\\\\.report_header\\\\ is\\\\ inconsistent\\\\ with\\\\ res\\\\.company\\\\.report_header

When\\\\ i\\\\ check\\\\ this\\\\ odoo14\\\\ have\\\\ text\\\\ field\\\\(report_header\\\\)\\\\ in\\\\ base\\\\.document\\\\.layout\\\\ but\\\\ in\\\\ the\\\\ script\\\\ they\\\\ are\\\\ not\\\\ tying\\\\ to\\\\ change\\\\ it\\\\ in\\\\ html\\\\ field\\\\.\\\\.\\\\.\\\\.\\\\.\\\\.



When\\\\ i\\\\ try\\\\ to\\\\ change\\\\ in\\\\ pre_migration\.py\ i\ got\ pysopg2\ error


i\ have changed\ the\ pre_migration\.py\ file\ of\ web\ like\ below

from\ openupgradelib\ import\ openupgrade


rename_xmlids_web\ =\ \[

 \  \ \("web\.external_layout_background",\ "web\.external_layout_striped"\),

 \  \ \("web\.external_layout_clean",\ "web\.external_layout_bold"\),

 \  \ \("web\.report_layout_background",\ "web\.report_layout_striped"\),

 \  \ \("web\.report_layout_clean",\ "web\.report_layout_bold"\),

\]


@openupgrade\.migrate\(use_env=False\)

def\ migrate\(cr,\ version\):

 \  \ openupgrade\.rename_xmlids\(cr,\ rename_xmlids_web\)

 \   

 \  \ openupgrade\.convert_field_to_html\(

 \  \  \  \ cr,\ "base_document_layout",\ "report_footer",\ "report_footer"

 \  \ \)

 \  \ openupgrade\.convert_field_to_html\(

 \  \  \  \ cr,\ "base_document_layout",\ "report_header",\ "report_header"

 \  \ \)


ERROR:

2023\-10\-04\ 06:17:35,449\ 15762\ ERROR\ odoo15\ odoo\.sql_db:\ bad\ query:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ report_footer\ IS\ NOT\ NULL

ERROR:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


2023\-10\-04\ 06:17:35,449\ 15762\ ERROR\ odoo15\ OpenUpgrade:\ web:\ error\ in\ migration\ script\ /opt/odoo15/custom\-addons/OpenUpgrade\-15\.0/openupgrade_scripts/scripts/web/15\.0\.1\.0/pre\-migration\.py:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


2023\-10\-04\ 06:17:35,449\ 15762\ ERROR\ odoo15\ OpenUpgrade:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2054,\ in\ wrapped_function

 \  \ func\(

 \ File\ "/opt/odoo15/custom\-addons/OpenUpgrade\-15\.0/openupgrade_scripts/scripts/web/15\.0\.1\.0/pre\-migration\.py",\ line\ 14,\ in\ migrate

 \  \ openupgrade\.convert_field_to_html\(

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2204,\ in\ convert_field_to_html

 \  \ cr\.execute\(

 \ File\ "",\ line\ 2,\ in\ execute

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 89,\ in\ check

 \  \ return\ f\(self,\ \*args,\ \*\*kwargs\)

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 310,\ in\ execute

 \  \ res\ =\ self\._obj\.execute\(query,\ params\)

psycopg2\.errors\.UndefinedColumn:\ column\ "report_footer"\ does\ not\ exist

LINE\ 1:\ SELECT\ id,\ report_footer\ FROM\ base_document_layout\ WHERE\ rep\.\.\.

 \  \  \  \  \  \  \  \  \  \^


2023\-10\-04\ 06:17:35,453\ 15762\ WARNING\ odoo15\ odoo\.modules\.loading:\ Transient\ module\ states\ were\ reset 

2023\-10\-04\ 06:17:35,512\ 15762\ ERROR\ odoo15\ odoo\.modules\.registry:\ Failed\ to\ load\ registry 

2023\-10\-04\ 06:17:35,512\ 15762\ CRITICAL\ odoo15\ odoo\.service\.server:\ Failed\ to\ initialize\ database\ `odoo15`\. 

Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/opt/odoo15/odoo/service/server\.py",\ line\ 1258,\ in\ preload_registries

 \  \ registry\ =\ Registry\.new\(dbname,\ update_module=update_module\)

 \ File\ "/opt/odoo15/odoo/modules/registry\.py",\ line\ 87,\ in\ new

 \  \ odoo\.modules\.load_modules\(registry,\ force_demo,\ status,\ update_module\)

 \ File\ "/opt/odoo15/odoo/modules/loading\.py",\ line\ 470,\ in\ load_modules

 \  \ processed_modules\ \+=\ load_marked_modules\(cr,\ graph,

 \ File\ "/opt/odoo15/odoo/modules/loading\.py",\ line\ 363,\ in\ load_marked_modules

 \  \ loaded,\ processed\ =\ load_module_graph\(

 \ File\ "/opt/odoo15/odoo/modules/loading\.py",\ line\ 174,\ in\ load_module_graph

 \  \ migrations\.migrate_module\(package,\ 'pre'\)

 \ File\ "/opt/odoo15/odoo/addons/openupgrade_framework/odoo_patch/odoo/modules/migration\.py",\ line\ 18,\ in\ migrate_module

 \  \ MigrationManager\.migrate_module\._original_method\(self,\ pkg,\ stage\)

 \ File\ "/opt/odoo15/odoo/modules/migration\.py",\ line\ 180,\ in\ migrate_module

 \  \ migrate\(self\.cr,\ installed_version\)

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2054,\ in\ wrapped_function

 \  \ func\(

 \ File\ "/opt/odoo15/custom\-addons/OpenUpgrade\-15\.0/openupgrade_scripts/scripts/web/15\.0\.1\.0/pre\-migration\.py",\ line\ 14,\ in\ migrate

 \  \ openupgrade\.convert_field_to_html\(

 \ File\ "/usr/local/lib/python3\.8/dist\-packages/openupgradelib/openupgrade\.py",\ line\ 2204,\ in\ convert_field_to_html

 \  \ cr\.execute\(

 \ File\ "",\ line\ 2,\ in\ execute

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 89,\ in\ check

 \  \ return\ f\(self,\ \*args,\ \*\*kwargs\)

 \ File\ "/opt/odoo15/odoo/sql_db\.py",\ line\ 310,\ in\ execute

 \  \ res\ =\ self\._obj\.execute\(query,\ params\)

psycopg2.errors.UndefinedColumn: column "report_footer" does not exist

LINE 1: SELECT id, report_footer FROM base_document_layout WHERE rep...


Is any one know, how to do or what is wrong kindly reply

NOTE: I have only changed the pre_migration.py...

Thanks in Advance

0
Avatar
Abbandona
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Risposta migliore

Hi,

To resolve the issue, you need to run the following SQL query on your database:

ALTER TABLE base_document_layout ADD COLUMN report_footer TEXT;

After running this query, re-run the specific OpenUpgrade migration, and the issue should be resolved.


Hope it helps

0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
OpenUpgrade V6-V7 : No module named openupgradelib.openupgrade_tools
migration openupgrade OpenUpgrade
Avatar
0
lug 23
3059
Asset Management migration V12.0 to new versions
migration openupgrade
Avatar
0
mag 23
3123
How to set up 2 OpenUpgrade Servers Risolto
migration openupgrade
Avatar
1
ago 19
5406
Error openupgrade hr module
migration openupgrade
Avatar
Avatar
1
mar 15
6442
Database Migration error from Odoo 14 to 15(Community) using Openeupgrade.
migration openupgrade databasemigration
Avatar
Avatar
1
mag 25
3052
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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