Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

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

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
migrationopenupgradeOpenUpgrade
1 Répondre
3210 Vues
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
Ignorer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Meilleure réponse

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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
OpenUpgrade V6-V7 : No module named openupgradelib.openupgrade_tools
migration openupgrade OpenUpgrade
Avatar
0
juil. 23
3033
Asset Management migration V12.0 to new versions
migration openupgrade
Avatar
0
mai 23
3107
How to set up 2 OpenUpgrade Servers Résolu
migration openupgrade
Avatar
1
août 19
5381
Error openupgrade hr module
migration openupgrade
Avatar
Avatar
1
mars 15
6424
Database Migration error from Odoo 14 to 15(Community) using Openeupgrade.
migration openupgrade databasemigration
Avatar
Avatar
1
mai 25
3036
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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